Three Cities
In one state there are N cities. Some cities are connected by roads, and for any two cities A and B the following property: there is exactly one way to get from city A to city B if you can only move along roads and are not allowed to pass through the same road more than once.
Recently, the president of this country interested in the question: what are the three cities are the most distant from each other. Namely, we call the mutual distance from each other in three cities A, B and C, the minimum number of roads that should be used to get from A to B, then from B to C and then from C to A (in this case is allowed to use one and the the same way in different journeys).
Required to find the three cities for which the mutual distance from each other will be maximum.
For example, for the five cities connected by roads, as shown in Figure 1, the three most distant of the town is 1, 2 and 5 (the mutual distance is 2 + 3 + 3 = 8), and for the cities in Figure 2 - it's all three cities, chosen from the set {1, 2, 4, 5} (distance 2 + 2 + 2 = 6).
Input
The first line contains the number N - the number of cities (3 ≤ N ≤ 1000). The next N lines contain a description of the cities. Description of i-City first contains K_i - the number of cities with which it is connected to roads(1 ≤ K_i < N), then K_i numbers - the number of cities with which it is connected.
It is guaranteed that the input data is valid is if there is a road from city A to city B, then there is a way out of city B to city A, and for all pairs of cities holds the property specified in the problem.
Output
Output three different numbers - numbers of the three most distant cities in random order. If several solutions, output any of them.