#include <iostream>
using namespace std;
int main()
{
int n, d, a[1005] = {};
cin >> n >> d;
int k;
for (int i = 1; i <= d; i++)
{
cin >> k;
a[k] += i;
}
for (int i = 0; i < n; i++)
{
cout << a[i] << " ";
}
return 0;
}