시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB3000.000%

## 문제

Assume we have a network of computers, where each computer is connected with others by means of cables. Each cable connects exactly two computers, and two computers can be connected to each other by only one cable. Given a network of computers you are requested to determine all the cables that participate in a cycle. Also, for each cable you must determine the number of cycles in which this cable participates. A cycle is a sequence of cables, starting from computer A and leading to itself. However, each computer, other than A, in the cycle, should participate only once.

## 입력

Your program should read the input from standard input as follows. The first line contains a positive integer number N (N<=20) denoting the number of computers in the network. The next N lines describe the computer connections in a matrix form. Thus, each line has N elements, separated by a space character. If an entry in line L and column C is 0, this means that there is no direct connection between computers L and C. Otherwise there is a direct connection between them.

## 출력

Your program should write the output into standard output as follows. The first line contains a positive integer denoting the number M of cables that participate in at least one cycle. Then, one line follows, containing a sequence of M positive integer numbers (separated by a space character) representing the number of cycles that each cable participates in. This sequence must be sorted in increasing order. If there is no cable that participates in cycle(s), the output file should contain a single line with the string "NO CYCLE".

## 예제 입력 1

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


## 예제 출력 1

7
2 2 2 2 2 2 2