size=5x5x5
program 1
*start
    if carrying != NONE then goto *do_put

*do_get
    if check(FRONT) == MATERIAL && material(FRONT) == BALANCED then goto *take
    if find(BALANCED) then goto *walk
    turn RIGHT
    goto *start

*take
    get
    goto *start

*do_put
    if check(FRONT) == ORDER && order(FRONT) == STAIR then goto *place
    if find(STAIR) then goto *walk
    turn RIGHT
    goto *start

*place
    put
    goto *start

*walk
    go
    goto *start
endprogram

z=1
..........
..........
..........
....n?....
B4B4^.....

z=2
..........
..........
....n?....
..........
..........

z=3
..........
....n?....
..........
..........
..........
