See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).
none
none
a = """move-left 
for-100000 
move-right 
move-left 
if-ok 
for-501 
move-down 
if-ok 
move-down 
else 
break 
endif 
end 
else 
move-up 
move-down 
if-ok 
for-501 
move-right 
if-ok 
move-right 
else 
break 
endif 
end 
else 
move-left 
move-right 
if-ok 
for-501 
move-up 
if-ok 
move-up 
else 
break 
endif 
end 
else 
move-down 
move-up 
if-ok 
for-501 
move-left 
if-ok 
move-left 
else 
break 
endif 
end 
else 
continue 
endif 
endif 
endif 
endif 
end"""
print(a)