See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).
none
none
print('''
for-498
  move-right
  if-ok
  for-249
    take
    move-up
    for-99
      if-ok
        take
        move-up
      else
        break
      endif
    end
    open-up
    for-99
      if-ok move-up else break endif
    end
    move-right
    take
    move-down
    for-99
      if-ok
        take
        move-down
      else
        break
      endif
    end
    open-down
    for-99
      if-ok move-down else break endif
    end
    move-right
  end
  take
  move-up
  for-99
    if-ok
      take
      move-up
    else
      break
    endif
  end
  open-up
  for-99
    if-ok take move-up else break endif
  end
  move-down
  for-99
    if-ok move-down else break endif
  end
  move-left
  for-249
    for-99
      if-ok move-up else break endif
    end
    move-left
    for-99
      if-ok move-down else break endif
    end
    move-left
  end
  move-down
  else
  move-down
  endif
end
move-down
for-999
  if-ok move-right else break endif
end
open-right
for-99
  if-ok move-right open-right else break endif
end
''')
