An advertising company wants to analyze the social network of students.
On Facebook, the company can observe "like" (按讚) events between students. If one students "likes" another student's post, the company assumes there is a friendship connection in between.
Please write a program to perform analysis on these "like" events for the comapny. This is important for the comapny to decide on the advertising strategies in different schools.
The first number is the number of schools we want to analyze.
For each school, there is a number indicating the number of "like" events recorded.
Each "like" event involves two students, which are represented by two integers.
For each school, print out the following information.
The first line is the index of the school.
The second to fifth lines are apperant. Average friends per student are displayed using
The six line shows "Max. depth-2 friendship group", which means the size of a group of a student, his/her friends, and the friends of his/her friends.
The seven line shows "Number of separate groups", which is the the number of student groups without any direct or indirect friendship connections in between.