2
6 5 5 18
1 0 0 0 1
0 0 0 0 0
0 0 0 0 1
0 1 0 0 1
0 0 1 0 0
0 0 0 0 0
1 0 0 0 0
0 0 0 0 0
1 0 0 0 1
0 1 0 0 0
0 0 0 0 0
1 0 0 0 1
0 1 0 1 1
0 0 0 0 0
0 0 0 0 1
0 0 1 0 1
1 0 1 0 1
1 0 0 0 0
0 0 0 0 0
0 0 0 0 1
0 0 0 0 0
0 0 1 1 0
0 0 0 0 1
0 0 0 1 0
0 0 0 0 1
0 0 0 1 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 1
0 0 0 0 0
1 3 7 9
0 0 1 0 1 0 0
0 0 0 0 1 0 1
1 0 1 0 1 1 0
13
-1