Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

From list of edges to adjacency matrix

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

Input

The first line contains two integers n (1 ≤ n ≤ 100) - number of vertices and m (1 ≤ m ≤ n · (n - 1) / 2) - number of edges. Next m lines contain m pairs of integers, each pair gives one edge of the graph.

Output

Print the adjacency matrix of the graph.

Time limit 1 second

Memory limit 64 MiB

Input example #1

3 3
1 2
2 3
1 3

Output example #1

0 1 1
1 0 1
1 1 0