eolymp
bolt
Try our new interface for solving problems
Problems

From list of edges to adjacency matrix

From list of edges to adjacency matrix

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

Input

The first line contains two integers n (1n100) - number of vertices and m (1mn · (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 128 MiB
Input example #1
3 3
1 2
2 3
1 3
Output example #1
0 1 1
1 0 1
1 1 0