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