UVa 10608 - Friends

10608 - Friends

 * http://acm.uva.es/p/v106/10608.html

Summary
Find the biggest group of friend in a town.

Explanation
This is a Graph Theory problem, and in particular, Union Set problem.

Gotcha's
Don't read any more cases than are listed in the beginning of the input!

Input
2 3 2 1 2 2 3 10 12 1 2 3 1 3 4 5 4 3 5 4 6 5 2 2 1 7 10 1 2 9 10 8 9

Output
3 6