1. ## Olympiad of Brazilian informatics 2011

Every week, Juquinha has classes in ACM (Performing and Musical Arts) at the school where she studies and, recently, her teacher announced that there will be a gymkhana at the end of the semester. However, teams should be trained as soon as possible so that students can rehearse.
Each team consists of one or more students, and each student has to belong to exactly one team. In addition, teams can not be formed anyway: if one student is friends with another, these students must be on the same team. The teacher then asked the students to inform her of the friendship relations in the classroom. The students then numbered from 1 to N and wrote a list whose lines contain pairs of
numbers. If two students whose numbers are i and j are friends, there will be at least one line
containing i and j or j and i in the list. Conversely, if there is a line containing i and j in the list, then the
Students whose numbers are i and j are friends.
The teacher then collected the list and, in the next class, should decide what teams to train. She is thinking of forming as many teams as possible and would like to know how many times she would form. Help the teacher by writing a program that, given the friends list, determines how many teams she can train.

2. Ok, so where is your attempt?

Just posting your assignment and expecting a complete free answer right off the bat isn't going to work.

Show us what you know, and we'll help you over the hurdles.