@staticmethod
def c():
    (n, _, *ab) = map(int, sys.stdin.read().split())
    friends = ([0] * n)
    for (a, b) in zip(*([iter(ab)] * 2)):
        a -= 1
        b -= 1
        friends[a] |= (1 << b)
        friends[b] |= (1 << a)
    res = [bit_count((cumor((friends[j] for j in range(n) if ((friends[i] >> j) & 1))) & (~ (friends[i] | (1 << i))))) for i in range(n)]
    print(*res, sep='\n')
@staticmethod
def c():
    (n, _, *ab) = map(int, sys.stdin.read().split())
    friends = ([0] * n)
    for (a, b) in zip(*([iter(ab)] * 2)):
        a -= 1
        b -= 1
        friends[a] |= (1 << b)
        friends[b] |= (1 << a)
    res = [bit_count((cumor((friends[j] for j in range(n) if ((friends[i] >> j) & 1))) & (~ (friends[i] | (1 << i))))) for i in range(n)]
    print(*res, sep='\n')