Graph Tournament
In this task, you need to construct a tournament graph with n vertices, ensuring that the shortest path between any two vertices is no longer than two edges.
A directed graph without loops is termed a tournament if there is exactly one directed edge (in one of the two possible directions) between every pair of distinct vertices.
Input
The first line contains a single integer n (3 ≤ n ≤ 1000) — the number of vertices in the graph.
Output
Output -1 if no graph meets the specified conditions.
Otherwise, output n lines, each containing n numbers separated by spaces, representing the adjacency matrix a of the tournament. Assume the vertices are numbered from 1 to n. Here, a_{v,u} = 0 indicates no edge from vertex v to vertex u, and a_{v,u} = 1 indicates the presence of an edge.
Since the graph must be a tournament, the following conditions must be satisfied:
a_{v,u} + a_{u,v} = 1 for all v, u (1 ≤ v, u ≤ n, v ≠ u);
a_{v,v} = 0 for all v (1 ≤ v ≤ n).