codeforces#P92111. Labyrinth-11

Labyrinth-11

Description

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