codeforces#P92110. Labyrinth-10

Labyrinth-10

Description

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