시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 (언어별 추가 시간 없음) 512 MB (언어별 추가 메모리 없음) 3 3 3 100.000%

문제

A store has n cashiers numbered sequentially from 1 to n, with c customers in a queue. A customer at the front of the queue is constantly assigned to the first unoccupied cashier, i.e., cashier with the smallest number. The ith customer’s shopping cart takes ti seconds to process.

Find which cashier will process each customer’s shopping cart.

입력

The first line of input contains two space-separated integers n and c (1 ≤ n ≤ c ≤ 1000). The second line of input contains c space-separated integers t1, . . . , t`, representing the length of time required to handle that customer.

출력

Output a single line containing c space-separated integers, each with the cashier number that handles that customer.

예제 입력 1

3 10
406 424 87 888 871 915 516 81 275 578

예제 출력 1

1 2 3 3 1 2 3 1 2 1