n, m = (int(i) for i in input().split())

city2city = [0] * n

for i in range(m):

    a,b = (int(i) for i in input().split())

    city2city[a-1] += 1

    city2city[b-1] += 1



for c in city2city:

    print(c)

def main():

    N, M = (int(i) for i in input().split())

    c = [0 for i in range(N)]

    for i in range(M):

        a, b = (int(i) for i in input().split())

        c[a-1] += 1

        c[b-1] += 1

    print(*c, sep="\n")





if __name__ == '__main__':

    main()

n, m = (int(i) for i in input().split())
city2city = [0] * n
for i in range(m):
    a, b = (int(i) for i in input().split())
    city2city[a - 1] += 1
    city2city[b - 1] += 1
for c in city2city:
    print(c)

def main():
    N, M = (int(i) for i in input().split())
    c = [0 for i in range(N)]
    for i in range(M):
        a, b = (int(i) for i in input().split())
        c[a - 1] += 1
        c[b - 1] += 1
    print(*c, sep="\n")


if __name__ == "__main__":
    main()

-n, m = (int(i) for i in input().split()) -city2city = [0] * n -for i in range(m): -    a, b = (int(i) for i in input().split()) -    city2city[a - 1] += 1 -    city2city[b - 1] += 1 -for c in city2city: -    print(c) +def main(): +    N, M = (int(i) for i in input().split()) +    c = [0 for i in range(N)] +    for i in range(M): +        a, b = (int(i) for i in input().split()) +        c[a - 1] += 1 +        c[b - 1] += 1 +    print(*c, sep="\n") + + +if __name__ == "__main__": +    main()