Thanks to your hint, I managed to beat the game! Some of the later levels were much easier, while others were tougher.