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

