beginning_of_program define_new_instruction este as while not_facing_east do turnleft; define_new_instruction checar as { turnleft; if front_is_clear then move; if right_is_clear then { turnleft; turnleft; move; turnleft; move; } else iterate 3 times turnleft; } define_new_instruction pared as if right_is_blocked then { if front_is_clear then { move; turnleft; move; if right_is_clear then {iterate 2 times turnleft; move; turnleft; pared;} } else turnleft; pared; } else { iterate 3 times turnleft; move; } beginning_of_execution este; while front_is_clear do checar; turnleft; pared; turnoff; end_of_execution end_of_program