Given a graph with vertices, where each vertex has degree at least , your task is to find a Hamiltonian cycle.
The first line contains an integer (3 \leq N \leq 4000) — the number of vertices in the graph.
The next lines contain the adjacency matrix. Since the adjacency matrix is symmetric and the diagonal entries are always zero, the -th line contains i - 1 symbols: zeros and ones. If the -th symbol in the -th line is one, then there is an edge between vertices and .
It is guaranteed that the graph contains a Hamiltonian cycle and the degree of each vertex is at least .
Output a permutation of numbers — the vertices in the order they appear in the Hamiltonian cycle.
Example 1