from collections import deque import sys input = sys.stdin.readline N, M = map(int, input().split()) G = [[] for _ in range(N)] for _ in range(M): u, v = map(int, input().split()) u-=1 v-=1 G[u].append(v) G[v].append(u) deq = deque() deq.append(0) INF = 10**9 dist = [INF for _ in range(N)] dist[0] = 0 while deq: v = deq.popleft() for nv in G[v]: if dist[nv]>dist[v]+1: dist[nv] = dist[v]+1 deq.append(nv) ans = [0 for _ in range(N+1)] for i in range(N): if dist[i]==INF: continue ans[dist[i]] += 1 for i in range(1, N+1): if i>=2: ans[i] += ans[i-2] print(ans[i])