#include <bits/stdc++.h>
using std::swap;
const int MAXN = 100011;
int N;
struct Vert {
  int FE;
  int Len;
} V[MAXN];
struct Edge {
  int y, next;
} E[MAXN << 1];
int Ecnt;
void addE(int a, int b) {
  ++Ecnt;
  E[Ecnt].y = b;
  E[Ecnt].next = V[a].FE;
  V[a].FE = Ecnt;
}
int Ret, K;
void DFS(int at, int f) {
  int max = 1, sec = 1, l;
  for (int k = V[at].FE, to; k > 0; k = E[k].next) {
    to = E[k].y;
    if (to == f) continue;
    DFS(to, at);
    l = V[to].Len + 1;
    if (l > sec) {
      if (l > max) swap(l, max);
      sec = l;
    }
  }
  if (max + sec > K) {
    ++Ret;
    V[at].Len = 0;
  } else
    V[at].Len = max;
}
int Calc(int k) {
  K = k;
  Ret = 0;
  DFS(1, 0);
  return Ret;
}
int Ans[MAXN];
void Deal(int ql, int qr, int vl, int vr) {
  if (ql > qr) return;
  if (vl == vr) {
    int vm = (vl + vr) >> 1;
    for (int q = ql; q <= qr; ++q) Ans[q] = vm;
    return;
  }
  int qm = (ql + qr) >> 1, vm = Calc(qm);
  Ans[qm] = vm;
  Deal(ql, qm - 1, vm, vr);
  Deal(qm + 1, qr, vl, vm);
}
int main() {
  scanf("%d", &N);
  for (int i = 1, a, b; i < N; ++i) {
    scanf("%d%d", &a, &b);
    addE(a, b);
    addE(b, a);
  }
  Deal(1, N, 0, N);
  for (int i = 1; i <= N; ++i) printf("%d\n", Ans[i]);
  return 0;
}
