class program { define turnright () { iterate(3) { turnleft(); } } program() { while (notFacingEast) { turnleft(); } while (frontIsClear) { move(); } turnleft(); while (rightIsBlocked) { while (rightIsBlocked) { move(); } turnright(); move(); while (rightIsBlocked && frontIsClear) { move(); } turnleft(); } turnleft(); move(); putbeeper(); turnoff(); } }