In a given array of integers, find the elements that occur most frequently. First, determine the highest frequency for any element in the array. Then, output all elements that have this maximum frequency. The order of output should correspond to the order in which each element first reaches this frequency in the input.
The first line contains an integer (1 \leq N \leq 1000), the number of elements in the array.
The second line contains integers. Each integer's absolute value does not exceed .
On the first line, output the maximum frequency of any element.
On the second line, output all elements that occur with this maximum frequency in the order described above.
Example 1