1,2: Sample Input

3: Case 2, order of people mixed around
4: A chain of 4 that does not form a cycle (so should no count), and another chain of 2 that works.
5: Nobody has anything that anyone else wants
6: A chain that contains everyone, but does not go back to a cycle, so length is 0
7-10: random length 10
10-15: random length 50
15-20: random length 100
21: 10 people, all in a cycle
22: 2 cycles of the same length
23: 4 cycles all of same length
24: 4 cycles of length 2,3,4,5
25: 2 cycles, one of 4, one of 3
