Fatigued by the endless toil of farming, Farmer John has decided to try his hand at the MP3 player market with his new iCow. The iCow is an MP3 player that stores songs, indexed from to , and plays them in a "shuffled" order according to an algorithm designed by Farmer John:
Each song has an initial rating r_i~(1 \le r_i \le 10^4).
The next song to be played is always the song with the highest rating. If two or more songs have the same rating, the song with the lowest index is chosen.
After a song is played, its rating is set to zero, and its rating points are distributed evenly among the other n - 1 songs.
If the rating points cannot be distributed evenly (that is, if they are not divisible by n - 1), the extra points are distributed one at a time to the first songs in the list (r_1, r_2, etc.), skipping the song that was just played, until all extra points have been distributed.
This process is repeated using the new ratings after each song is played.
Determine the first songs played by the iCow.
The first line contains two integers: n~(1 \le n \le 1000) and t~(1 \le t \le 1000).
Each of the next lines contains one integer r_i.
Print lines. Line should contain a single integer representing the index of the -th song played by the iCow.
Example 1