You are given a binary matrix consisting of zeroes and ones. Initially, you have an empty string . You start in the position (left-up corner) and move right or down. You append each element you have passed to the string in the respective order.
Tell whether it is possible to achieve being a palindrome. If yes, print the way it should pass to achieve that.
Note that each matrix is randomly generated.
输入格式
The first line contains the only integer --- the size of a matrix.
The following lines contain the characters --- description of the matrix.
The input matrix for the problem is picked across all possible valid matrices for the problem of size .
输出格式
Print if there is no such palindrome.
Otherwise, in the first line, print . In each of the following lines, print two integers and () --- the coordinates of the -th cell.