#include <bits/stdc++.h>
using namespace std;
int ans = 0;
void dfsmax(int v, int now, int &mx, int &aim, int prev,
            vector<vector<int>> &g) {
  if (now > mx) {
    mx = now;
    aim = v;
  }
  for (int u : g[v]) {
    if (u == prev) continue;
    dfsmax(u, now + 1, mx, aim, v, g);
  }
}
void build(int v, int prev, vector<int> &dp, vector<int> &anc,
           vector<vector<int>> &g) {
  dp[v] = 0;
  anc[v] = prev;
  for (int u : g[v]) {
    if (u == prev) continue;
    build(u, v, dp, anc, g);
    dp[v] = max(dp[v], dp[u] + 1);
  }
}
void fill(int v, vector<int> &anc, vector<int> &dp, set<pair<int, int>> &d,
          vector<vector<int>> &g) {
  ans++;
  d.erase({dp[v], v});
  for (int u : g[v]) {
    if (u == anc[v] || d.find({dp[u], u}) == d.end()) continue;
    fill(u, anc, dp, d, g);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> dp(n), anc(n);
  vector<vector<int>> g(n);
  int A, B, mx = 0;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  dfsmax(0, 0, mx, A, -1, g);
  build(A, -1, dp, anc, g);
  set<pair<int, int>> d;
  for (int i = 0; i < n; ++i) {
    d.insert({dp[i], i});
  }
  vector<int> res(n);
  res[0] = 1;
  ans = 0;
  for (int i = 1; i < n; ++i) {
    if (!d.empty()) {
      auto it = d.end();
      it--;
      int v = it->second;
      ans++;
      d.erase(it);
      while (dp[v]) {
        for (int u : g[v]) {
          if (dp[u] + 1 == dp[v]) {
            v = u;
            d.erase({dp[u], u});
            ans++;
          }
        }
      }
    }
    res[i] = ans;
  }
  for (int e : res) cout << e << " ";
}
