You're in a job fair. The fair hall is in the form of a MxN matrix. You are in a position c - the starting point. Your HR is in the position - h. you've to reach your HR inorder to secure your job. Your competitors are in cell 0. Follow the cell in which the number is '1' to reach your HR. Find the shortest path from 2 to 3. Incase of no path from 2 to 3, print 'no path'.
Sample Input :
4 4
0 2 0 0
1 1 0 0
1 1 3 0
0 0 1 0
Sample Output :
1 1
2 1
2 2