Алгоритм в командах исполнителя Robot языка Pascal ABC
while FreeFromDown do Down;
repeat Paint; Right until FreeFromDown;
Right;
repeat Paint; Right until FreeFromDown;
Down; Down;
repeat Left; Paint until FreeFromUp;
Left;
repeat Left; Paint until FreeFromUp