#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 700012;
const int inf = 2e9;
int n, u, v;
vector<int> g[N];
int k, ans;
int best[N];
int len[N];
int st;
vector<int> order;
int par[N];
inline void dfs(int s) {
  for (int v : order) {
    int mx1 = 0, mx2 = -1e9;
    for (int to : g[v]) {
      if (to == par[v]) continue;
      if (len[to] >= mx1)
        mx2 = mx1, mx1 = len[to];
      else if (len[to] >= mx2)
        mx2 = len[to];
    }
    if (mx1 + mx2 + 1 >= st) {
      len[v] = 0;
      ++ans;
    } else {
      len[v] = mx1 + 1;
    }
  }
}
int lvl[N];
inline void calc(int v, int p = 0) {
  lvl[v] = lvl[p] + 1;
  par[v] = p;
  for (int to : g[v]) {
    if (to == p) continue;
    calc(to, v);
  }
  order.push_back(v);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n - 1; ++i) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int root = 1;
  const int K = 700;
  calc(root);
  int kt = n;
  for (int i = 1; i <= min(K, n); ++i) {
    st = i;
    ans = 0;
    dfs(root);
    best[i] = ans;
    kt = min(kt, ans);
  }
  for (int i = 1; i <= kt + 1; ++i) {
    int l = 1, r = (n + i - 1) / i + 1;
    while (l + 1 < r) {
      int m = (l + r) / 2;
      ans = 0;
      st = m;
      dfs(root);
      if (ans >= i)
        l = m;
      else
        r = m;
    }
    best[l] = max(best[l], i);
  }
  for (int i = n; i >= 1; --i) {
    best[i] = max(best[i], best[i + 1]);
  }
  cout << n << '\n';
  for (int i = 2; i <= n; ++i) cout << best[i] << '\n';
  return 0;
}
