11648 - 2D character position   

Description

Determine the positions of each letter in a given 2D character array. Then output the positions of each letter in lexicographical order. For each letter, output its positions from left-top to right-bottom.

Input

First, you will get an integer N, N <= 2000, meaning you will get an N*N 2D character array. Then, you will get N lines of input and N characters in each line.

Output

Please output each position using the format (x,y), and then add a space between two positions. Remember to add ‘\n’ at the end of the outcome of every letter.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss