PROGRAMMING:Relationship circle
Chinese people like to find relationships. Seven aunts and eight aunts are relationships, colleagues and comrades in arms are relationships, and teachers and classmates are relationships. Of course, relationships can be divided into intimacy and estrangement. If Zhang San and Li Si are college classmates, then we say they have a very close relationship. The distance is 0. If Zhang San and Li Si are college classmates, and Li Si and Wang Wu are colleagues, then Zhang San and Wang Wu can also get involved in the relationship, but the relationship is not so close, We say their distance is 1. A relationship circle is composed of all the people who can get involved in the relationship. We define the maximum distance between any two people in the relationship circle as the diameter of the relationship circle.
###Input format:
Each input includes a test case. In the first line, the number of input people is n, 2 < n < 1000. We number them as 1 to n respectively, and then n lines. The relationship of each person is given in the following format:
K ID[1] ID[2] ... ID[K]
Where k is the relationship number, followed by the number of the person who has a relationship with the person. K < = 10, no one has a relationship with themselves.
###Output format:
For each group of inputs, output the number of relationship circles and the diameter of the largest relationship circle in a row, separated by a space.
###Input example:
Here is a set of inputs. For example:
```in
seventeen
2 15 12
1 17
2 16 9
1 8
4 10 13 15 14
0
2 11 14
1 4
2 2 3
2 13 11
2 15 7
2 1 14
2 5 15
0
0
1 3
1 2
```
###Output example:
The corresponding output is given here. For example:
```out
4 3
```
answer:If there is no answer, please comment
###Input format:
Each input includes a test case. In the first line, the number of input people is n, 2 < n < 1000. We number them as 1 to n respectively, and then n lines. The relationship of each person is given in the following format:
K ID[1] ID[2] ... ID[K]
Where k is the relationship number, followed by the number of the person who has a relationship with the person. K < = 10, no one has a relationship with themselves.
###Output format:
For each group of inputs, output the number of relationship circles and the diameter of the largest relationship circle in a row, separated by a space.
###Input example:
Here is a set of inputs. For example:
```in
seventeen
2 15 12
1 17
2 16 9
1 8
4 10 13 15 14
0
2 11 14
1 4
2 2 3
2 13 11
2 15 7
2 1 14
2 5 15
0
0
1 3
1 2
```
###Output example:
The corresponding output is given here. For example:
```out
4 3
```
answer:If there is no answer, please comment