Theseus and labyrinth

Problem Name:
Theseus and labyrinth
Site:CodeForces
Links:
Tags:
Problem setters: