Assume you are given a checker board of size NxN which is filled with 0s and 1s. Write a program to find the row(s) with all zeros.
For example, the following board of size 8x8, has all zeros in row 2 and 8.
The input consists of a few test cases. For each test case, the first line of input is a positive integer N (N ≤ 24) which indicates the size of the board. The following N lines contains the data with N number of 0 for each line (please refer to sample input). Input is terminated by a test case where N is 0.
For each test case, the output contains a line in the format "Case #x:", where x is the case number (starting from 1). The following line(s) contains the row number with all the elements are zero, each in separate line.
sample input
8
1 0 1 0 1 0 0 0
1 0 1 0 0 0 0 1
1 1 1 0 0 0 1 1
1 0 1 0 0 0 0 1
1 1 1 0 0 1 1 1
1 0 0 0 0 0 0 1
1 0 1 0 0 1 1 1
0 0 1 0 0 0 0 1
5
0 0 0 0 0
1 1 1 0 1
1 0 1 0 0
1 1 1 0 0
1 0 1 0 0
0
sample output
Case #1:
Case #2:
row 1
As you can see that if all the elements in a row are zero, than the sum of all elements are zero.