Karel dreams of climbing mountains. Teach her to get to the top of a mountain of any height. For example, for the following mountain:

Karel should climb to the top and leave a flag (a beeper) at the summit as shown bellow:

Unlike the previous problems, you are not garunteed the height of the mountain before hand. The program you write should allow Karel to climb mountains of any size. For example the following three:

You can assume:

  • Karel starts on the bottom left of the world, facing east.
  • There is one space (on the left and the right) between the mountain and the world boundry.
  • The mountain is at least one square high.

Use while loops.