#include <bits/stdc++.h>
#pragma optimization_level 3
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int __BS = 4096;
static char __bur[__BS + 16], *__er = __bur + __BS, *__ir = __er;
template <class T = int>
T readInt() {
  auto c = [&]() {
    if (__ir == __er)
      std::fill(__bur, __bur + __BS, 0), cin.read(__bur, __BS), __ir = __bur;
  };
  c();
  while (*__ir && (*__ir < '0' || *__ir > '9') && *__ir != '-') ++__ir;
  c();
  bool m = false;
  if (*__ir == '-') ++__ir, c(), m = true;
  T r = 0;
  while (*__ir >= '0' && *__ir <= '9') r = r * 10 + *__ir - '0', ++__ir, c();
  ++__ir;
  return m ? -r : r;
}
static char __buw[__BS + 20], *__iw = __buw, *__ew = __buw + __BS;
template <class T>
void writeInt(T x, char endc = '\n') {
  if (x < 0) *__iw++ = '-', x = -x;
  if (x == 0) *__iw++ = '0';
  char* s = __iw;
  while (x) {
    T t = x / 10;
    char c = x - 10 * t + '0';
    *__iw++ = c;
    x = t;
  }
  char* f = __iw - 1;
  while (s < f) swap(*s, *f), ++s, --f;
  if (__iw > __ew) cout.write(__buw, __iw - __buw), __iw = __buw;
  if (endc) {
    *__iw++ = endc;
  }
}
struct __FL__ {
  ~__FL__() {
    if (__iw != __buw) cout.write(__buw, __iw - __buw);
  }
};
static __FL__ __flushVar__;
const int G = 500001;
int a, OPA = -1;
vector<int> l[G];
int skok[G], o[G], zam[G], mxd[G], mxp[G], sz[G], good[G];
pair<int, int> dp[G], GR[G];
int CALC(int v, int p, int D) {
  mxd[v] = 1;
  sz[v] = 1;
  int c1 = 0, c2 = 0;
  for (int h : l[v]) {
    if (h == p) continue;
    int x = CALC(h, v, D + 1);
    mxd[v] = max(mxd[v], x + 1);
    sz[v] += sz[h];
    if (x >= c1)
      c2 = c1, c1 = x;
    else if (x > c2)
      c2 = x;
  }
  mxp[v] = c1 + c2 + 1;
  return mxd[v];
}
int find_centroid(int v, int p) {
  int MX = 0, num = -1;
  for (int h : l[v]) {
    if (h != p && sz[h] > MX) MX = sz[h], num = h;
  }
  return MX > a / 2 ? find_centroid(num, v) : v;
}
void RIP_PAPA(int v, int p) {
  for (int q = 0; q < l[v].size(); q++) {
    if (l[v][q] == p) {
      l[v].erase(l[v].begin() + q);
      break;
    }
  }
  for (int h : l[v]) RIP_PAPA(h, v);
}
void gbst(int v, int p, int sv) {
  zam[v] = sv;
  for (int h : l[v]) {
    if (h == p) continue;
    if (sv)
      gbst(h, v, (l[v].size() == 2 ? sv + 1 : 0));
    else if (p != -1)
      gbst(h, v, 0);
    else {
      if (l[v].size() == 1)
        gbst(h, v, 1);
      else if (l[v].size() > 2)
        gbst(h, v, 0);
      else {
        if (h == l[v][0])
          gbst(h, v, (good[l[v][1]] ? sz[l[v][1]] + 1 : 0));
        else
          gbst(h, v, (good[l[v][0]] ? sz[l[v][0]] + 1 : 0));
      }
    }
    if (good[h]) zam[v] += sz[h];
  }
}
int eba = 0;
inline void rnm(int v) {
  zam[v] = eba++;
  deque<int> dq = {v};
  for (; dq.size();) {
    int x = dq[0];
    dq.pop_front();
    for (int h : l[x]) {
      if (zam[h] != -1) continue;
      dq.push_back(h);
      zam[h] = eba++;
    }
  }
}
int iba = 0;
inline void rnm2(int v) {
  zam[v] = iba++;
  deque<int> dq = {v};
  for (; dq.size();) {
    int x = dq[0];
    dq.pop_front();
    for (int h : l[x]) {
      if (!good[h]) dq.push_back(h);
      zam[h] = iba++;
    }
  }
}
int ST;
int GA(int LEN) {
  if (o[LEN] != -1) return o[LEN];
  int d1, d2, w, rg;
  for (; ST >= 0 && mxp[ST] < OPA;) ST--;
  for (int q = ST; q >= 0; q--) {
    if (mxp[q] < OPA) continue;
    if (good[q])
      dp[q].first = sz[q] / LEN, dp[q].second = sz[q] - dp[q].first * LEN;
    else {
      dp[q].first = 0;
      d1 = d2 = 0, w = GR[q].first, rg = GR[q].second;
      for (; w <= rg; w++) {
        dp[q].first += dp[w].first;
        if (dp[w].second >= d1)
          d2 = d1, d1 = dp[w].second;
        else
          d2 = max(d2, dp[w].second);
      }
      if (d1 + d2 + 1 < LEN)
        dp[q].second = d1 + 1;
      else
        dp[q].first++, dp[q].second = 0;
    }
  }
  return o[LEN] = dp[0].first;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  ;
  memset(o, -1, sizeof(o));
  memset(zam, -1, sizeof(zam));
  a = readInt();
  o[1] = a;
  ST = a - 1;
  for (int q = 1; q <= a; q++) skok[a / q]++;
  for (int& i : skok) i /= 2;
  vector<pair<int, int> > reb(a - 1);
  for (int q = 0; q < a - 1; q++) {
    int x = readInt() - 1, y = readInt() - 1;
    reb[q] = {x, y};
    l[x].push_back(y);
    l[y].push_back(x);
  }
  CALC(0, -1, 1);
  for (int q = 0; q < a; q++) good[q] = sz[q] == mxd[q];
  gbst(0, -1, 0);
  int C = -1, MXV = -1;
  for (int q = 0; q < a; q++)
    if (zam[q] > MXV) MXV = zam[q], C = q;
  memset(zam, -1, sizeof(zam));
  uniform_int_distribution<int> gen(0, a - 1);
  rnm(gen(rnd));
  for (int q = 0; q < a; q++) l[q].clear();
  for (pair<int, int> p : reb) {
    l[zam[p.first]].push_back(zam[p.second]);
    l[zam[p.second]].push_back(zam[p.first]);
  }
  RIP_PAPA(0, -1);
  reb.clear();
  for (int q = 0; q < a; q++)
    for (int h : l[q]) reb.push_back({q, h});
  CALC(0, -1, 1);
  for (int q = 0; q < a; q++) good[q] = sz[q] == mxd[q];
  memset(zam, -1, sizeof(zam));
  zam[0] = 0;
  if (!good[0])
    rnm2(0);
  else
    iba = 1;
  ST = iba - 1;
  for (int q = 0; q < a; q++) {
    if (zam[q] == -1) continue;
    sz[zam[q]] = sz[q];
    mxd[zam[q]] = mxd[q];
    mxp[zam[q]] = mxp[q];
  }
  for (int q = 0; q < a; q++) l[q].clear();
  for (pair<int, int> p : reb) {
    if (min(zam[p.first], zam[p.second]) > -1) {
      l[zam[p.first]].push_back(zam[p.second]);
    }
  }
  for (int q = 0; q < a; q++) {
    if (l[q].size())
      GR[q] = {l[q][0], l[q].back()};
    else
      GR[q] = {a, q};
  }
  for (int q = 0; q < a; q++) good[q] = sz[q] == mxd[q];
  int diam = 0;
  for (int& i : mxp) diam = max(i, diam);
  o[diam] = 1;
  for (int q = diam + 1; q <= a; q++) o[q] = 0;
  int H = min(a - 1, (int)(sqrt(a * log2(a)) * 0.4)), I = 2;
  for (; I <= H; I++) {
    o[I] = GA(I);
    OPA = I / 2;
  }
  int tyt;
  for (; I <= a;) {
    OPA = I / 2;
    tyt = GA(I);
    int lf = I, rg = min(a + 1, lf + skok[tyt] + 1);
    if (tyt == 0) break;
    if (tyt == 1) lf = diam, rg = diam + 1;
    for (; lf + 1 < rg;) {
      int md = (lf + rg) / 2;
      if (GA(md) == tyt)
        lf = md;
      else
        rg = md;
    }
    for (; I < rg; I++) o[I] = tyt;
  }
  for (int q = 1; q <= a; q++) {
    writeInt(max(0, o[q]), '\n');
  }
}
