PROGRAMMING:Small generation
Given the genealogy of a large family, please give the list of the youngest generation.
###Input format:
Enter in the first line to give the family population n (a positive integer not exceeding 100000) - for simplicity, we number the family members from 1 to n. Then the second line gives n numbers, where the i-th number corresponds to the parent of the i-th member. The parent number of the oldest ancestor in the genealogy is - 1. The numbers in a row are separated by spaces.
###Output format:
First of all, output the smallest generation (the generation of ancestors is 1, and then increase step by step). Then in the second line, the number of the member with the smallest generation is output in ascending order. The numbers shall be separated by a space, and there shall be no extra space at the beginning and end of the line.
###Input example:
```in
nine
2 6 5 5 -1 5 6 4 7
```
###Output example:
```out
four
1 9
```
answer:If there is no answer, please comment
###Input format:
Enter in the first line to give the family population n (a positive integer not exceeding 100000) - for simplicity, we number the family members from 1 to n. Then the second line gives n numbers, where the i-th number corresponds to the parent of the i-th member. The parent number of the oldest ancestor in the genealogy is - 1. The numbers in a row are separated by spaces.
###Output format:
First of all, output the smallest generation (the generation of ancestors is 1, and then increase step by step). Then in the second line, the number of the member with the smallest generation is output in ascending order. The numbers shall be separated by a space, and there shall be no extra space at the beginning and end of the line.
###Input example:
```in
nine
2 6 5 5 -1 5 6 4 7
```
###Output example:
```out
four
1 9
```
answer:If there is no answer, please comment