Hi! I think I solved this task correctly, but the result checker gets stuck in test 2/2 and just stays there. I'm quite sure that my solution doesn't contain any infinite loops and though I have been wrong a few uninportant times in the past, I still think that this must be some kind of bug...
From: http://www.checkio.org/mission/open-labyrinth/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0
Created at: Dec. 19, 2015, 3:50 a.m.; Updated at: Dec. 20, 2015, 6:59 a.m.