import sys

from collections import Counter



sys.setrecursionlimit(10**7)

 

inf = 1<<100

 

def solve():

    N, M = map(int, input().split())

    ans = [0]*N



    for i in range(M):

        ai, bi = map(int, input().split())

        ai -= 1

        bi -= 1

        ans[ai] += 1

        ans[bi] += 1



    print(*ans, sep='\n')

 

if __name__ == '__main__':

    solve()

import sys



def solve():

    N, M = map(int, input().split())



    deg = [0] * N



    for i in range(M):

        ai, bi = map(int, input().split())

        ai, bi = ai - 1, bi - 1

        deg[ai] += 1

        deg[bi] += 1



    print(*deg, sep='\n')



if __name__ == '__main__':

    solve()

import sys
from collections import Counter

sys.setrecursionlimit(10**7)
inf = 1 << 100


def solve():
    N, M = map(int, input().split())
    ans = [0] * N
    for i in range(M):
        ai, bi = map(int, input().split())
        ai -= 1
        bi -= 1
        ans[ai] += 1
        ans[bi] += 1
    print(*ans, sep="\n")


if __name__ == "__main__":
    solve()

import sys


def solve():
    N, M = map(int, input().split())
    deg = [0] * N
    for i in range(M):
        ai, bi = map(int, input().split())
        ai, bi = ai - 1, bi - 1
        deg[ai] += 1
        deg[bi] += 1
    print(*deg, sep="\n")


if __name__ == "__main__":
    solve()

-from collections import Counter - -sys.setrecursionlimit(10**7) -inf = 1 << 100 -    ans = [0] * N +    deg = [0] * N -        ai -= 1 -        bi -= 1 -        ans[ai] += 1 -        ans[bi] += 1 -    print(*ans, sep="\n") +        ai, bi = ai - 1, bi - 1 +        deg[ai] += 1 +        deg[bi] += 1 +    print(*deg, sep="\n")