Codeforces and Polygon may be unavailable from May 23, 4:00 (UTC) to May 23, 8:00 (UTC) due to technical maintenance. ×

06. Labyrinth-6
time limit per test
8 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

See the problem statement here: http://codeforces.com/contest/921/problem/01.