Gratitude Loop

The contest is over, but organizers and contestants are still thanking each other:

“Thank you!”
“No, thank you!”
“No, no, thank you!”
“No, no, no, thank you!”

This could go on forever! To save everyone some typing, they created a messaging app with just one button: . After some effort, we were able to obtain a screenshot of the app installed on Paulo’s device. We include it below for your convenience.

Of course, Paulo is not the only person using this wonderful app. There are NN people using it, numbered from 11 to NN. Initially, nobody has received any messages. Whenever person ss presses , that person sends exactly one message to a recipient rr. The app chooses rr as follows:

The message is delivered immediately, before the next button press, and the sender ss becomes the person who most recently sent a message to the recipient rr.

Receiving a message does not send an automatic reply. Sending a message does not delete or change any of the sender’s received messages. A person can press the button repeatedly, even without receiving new messages between their button presses.

Given the sequence of button presses, determine how many messages each person receives. Count each message separately, including repeated messages from the same person.

Input

The first line contains two integers NN (2≤N≤10002 \leq N \leq 1000) and MM (1≤M≤10001 \leq M \leq 1000), indicating respectively the number of people and the number of button presses. Each person is identified by a distinct integer from 11 to NN.

The second line contains MM integers A1,A2,…,AM{A_1}, {A_2}, \ldots, {A_M} (1≤Ai≤N1 \leq A_i \leq N), where AiA_i is the person who makes the ii-th button press. The presses are made in the given order.

Output

Output a single line with NN integers C1,C2,…,CN{C_1}, {C_2}, \ldots, {C_N}, such that CiC_i is the number of messages received by person ii during the MM button presses.

Examples

Input

4 4
1 2 3 2

Output

2 1 0 1

Explanation

In this sample there are N = 4 people who make M = 4 button presses. The messages are sent from 1 to 2 (no messages received yet by 1), from 2 to 1 (last message received by 2 is from 1), from 3 to 4 (no messages received yet by 3), and from 2 to 1 (last message received by 2 is still from 1).

Input

2 3
2 2 2

Output

3 0

Explanation

Here N = 2 and M = 3. Person 2 never receives a message, so each of their three button presses sends a message to person 1.

Input

3 4
1 2 3 1

Output

2 1 1

Explanation

Now N = 3 and M = 4. The messages are sent from 1 to 2, from 2 to 1, from 3 to 1, and from 1 to 3.