[献花][花圈]

## 样例输入

6
0 0 0 1 0 0
0 0 1 1 0 0
0 1 0 1 0 0
1 1 1 0 0 0
0 0 0 0 0 1
0 0 0 0 1 0


## 样例输出

0 3 1 2
4 5


[献花][花圈]