See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).
none
none
print("""for-10000
    move-down
    move-right
    if-ok 
        move-right
        if-ok 
            for-500
                move-right
            end
            for-500
                move-right
                open-right
            end
            terminate
        else endif
        for-300
            for-20
                move-up
                take
                open-up
            end
            move-right
            for-20
                move-down
                take
                open-down
            end
	    move-right
        end
	for-300
            for-20
                move-up
                take
                open-up
            end
            move-left
            for-20
                move-down
                take
                open-down
            end
	    move-left
        end
    else endif
end""")