Divide the set of vertices of a given graph into two nonempty subsets A and B so that the number of edges between the subsets is minimized.
The first line contains the number of vertices (2 \leq n \leq 50) in the graph. Each of the next lines contains characters. The -th character in the -th line is if there is an edge between vertices and , and otherwise. The adjacency matrix of the graph is antireflexive (the diagonal elements are ) and symmetric (with respect to the main diagonal).
Output two lines. In the first line print the numbers of the vertices in set separated by spaces, and in the second line print the numbers of the vertices in set separated by spaces. The vertex numbers may be output in any order.
Example 1