#t104. 小杨的储蓄

小杨的储蓄

Xiaoyang's Piggy Banks

Problem Description

Xiaoyang has NN piggy banks, numbered from 00 to N−1N-1. Starting from day 11, Xiaoyang puts money into a piggy bank every day. Specifically, on day ii he chooses a piggy bank aia_i and deposits ii yuan. After DD days, he has forgotten how much money is in each piggy bank. Can you help him?

Input Format

The first line contains two integers NN and DD, separated by a single space. The second line contains DD integers, where the ii-th integer is aia_i. Integers on each line are separated by a single space.

Output Format

Output NN integers separated by single spaces, where the ii-th integer is the amount of money in the piggy bank numbered i−1i-1 (i=1,…,Ni = 1, \dots, N).

Sample Input

Sample Input 1

2 3
0 1 0

Sample Input 2

3 5
0 0 0 2 0

Sample Output

Sample Output 1

4 2

Sample Output 2

11 0 4

Sample Explanation

On day 11 Xiaoyang deposits 11 yuan into bank 00, on day 22 deposits 22 yuan into bank 11, and on day 33 deposits 33 yuan into bank 00. So bank 00 has 1+3=41+3=4 yuan and bank 11 has 22 yuan, matching the output 4 2.

Constraints

  • 1≤N,D≤10001 \le N, D \le 1000
  • 0≤ai≤N−10 \le a_i \le N-1
  • All inputs are integers