SMS voting
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
In the final American Idol SMS voting was conducted to determine the winners among the N participants. TV viewers to send SMS with the number (a number from 1 to N) of your favorite artist and number of the SMS were rating each participant. Total on the host computer competition, of M messages SMS. Need to make a program that displays numbers of three winners in descending order of their rankings and increasing numbers, if the ratings are equal.
Input
The first line contains two numbers N and M (3 ≤ N ≤ 100, 1 ≤ M ≤ 1000000).
The next line of M numbers, each of which does not exceed N.
Output
Three numbers - numbers of the winners recorded in a single line through the space.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 24%