Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.
Problem description
Given adjacency matrix of undirected graph. Print this graph in form of edges list.
Input
The first line of the input contains an integer N (1 ≤ N ≤ 100) that denotes the number of verticies in graph. Each of the
following N lines contains N integers 1 or 0, where 1 denotes edge and 0 if there is no edge.
Output
Print the edges list of given graph.
Example
| stdin |
stdout |
3
0 1 1
1 0 1
1 1 0 |
1 2
2 3
1 3 |
Для отправки решений необходимо выполнить вход.
|