From adjacency matrix to the list of edges - 2#473

From adjacency matrix to the list of edges - 2

1 second
128 megabytes
Very easy (≈850)

The simple oriented graph is given by the adjacency matrix. Print its representation as a list of edges.

Input

The first line contains number of vertices n (1 ≤ n ≤ 100) in the graph. Each of the next n lines contains n elements – the description of adjacency matrix.

Output

Print the list of edges, ordered by the first vertex in a pair that describes an edge.

Examples

Example 1

Loading
Loading