PROGRAMMING:Find the largest, second largest and third largest values
This topic requires to read in n integers, and output their maximum value, the second largest value and the third largest value with the least number of comparisons. For example, for the six numbers 13 13 1 10 34 10, the maximum value is 34, the second largest value is 13, and the third largest value is 10.
###Input format:
There are two lines of input. The first line is the number of integers n (≤ 1 000 000), and the second line is the number of integers separated by spaces.
###Output format:
For each group of input, output the maximum value, the second largest value and the third largest value in a row, separated by a space in the middle, but there is no extra space at the end of the line.
If the input data is less than three, "invalid input" is output.
If there is no third largest value, "there is no third largest element" is output.
If there are no second largest and third largest values, "there is no second largest and third largest element" is output.
###Input example:
```in
six
13 13 1 10 34 10
```
###Output example:
```out
34 13 10
```
answer:If there is no answer, please comment
###Input format:
There are two lines of input. The first line is the number of integers n (≤ 1 000 000), and the second line is the number of integers separated by spaces.
###Output format:
For each group of input, output the maximum value, the second largest value and the third largest value in a row, separated by a space in the middle, but there is no extra space at the end of the line.
If the input data is less than three, "invalid input" is output.
If there is no third largest value, "there is no third largest element" is output.
If there are no second largest and third largest values, "there is no second largest and third largest element" is output.
###Input example:
```in
six
13 13 1 10 34 10
```
###Output example:
```out
34 13 10
```
answer:If there is no answer, please comment