# coding: utf-8
init = [int(s) for s in input().rstrip().split(' ')]
data = [int(s) for s in input().rstrip().split(' ')]

uniq = list(set(data))
print(uniq)

values = [0] * init[0]
for c in uniq:
    values[c-1] = data.count(c)

for p in values:
    print(p)