N = int(input()) A = list(map(int, input().split())) if N == 1: exit(print(1)) F = [False]*N def func(k): ans = 0 cnt = 0 history = [] for a in A: if not F[a-1]: if cnt == k: ans += 1 while history: h = history.pop() F[h] = False cnt = 0 cnt += 1 F[a-1] = True history.append(a-1) while history: h = history.pop() F[h] = False return ans+1 route = int(N**0.6)+1 ans = [] for k in range(1, route+1): ans.append(func(k)) left = route while left <= N: now = ans[-1] idx = len(ans) right = N+1 while left+1 < right: mid = (left+right)//2 if func(mid) == now: left = mid else: right = mid for _ in range(right-idx-1): ans.append(now) if right <= N: ans.append(func(right)) left = right for a in ans: print(a)