iCow#10150

iCow

1 second
128 megabytes
Easy

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:

This process is repeated using the new ratings after each song is played.

Determine the first songs played by the iCow.

Input

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.

Output

Print lines. Line should contain a single integer representing the index of the -th song played by the iCow.

Examples

Example 1

Loading
Loading