#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int n;
int deg[maxn];
int val[maxn];
int ans[maxn];
bool removed[maxn];
vector<int> G[maxn];
int nxt[maxn];
void addEdge(int u, int v) {
  G[u].push_back(v);
  G[v].push_back(u);
}
int pre_dfs(int u, int pre) {
  int sz = G[u].size();
  if (deg[u] > 2) {
    nxt[u] = 0;
    return 0;
  }
  for (int i = 0; i < sz; i++) {
    int v = G[u][i];
    if (v == pre) continue;
    if (removed[v]) continue;
    nxt[u] = v;
    val[u] = pre_dfs(v, u) + 1;
    return val[u];
  }
  nxt[u] = 0;
  return 1;
}
priority_queue<pair<int, int> > que;
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    addEdge(u, v);
    deg[u]++;
    deg[v]++;
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (deg[i] == 1) {
      cnt++;
      pre_dfs(i, 0);
      que.push({-val[i], i});
    }
  }
  for (int i = cnt; i <= n; i++) {
    ans[i] = n;
  }
  ans[1] = 1;
  for (int i = cnt - 1; i > 1; i--) {
    pair<int, int> p = que.top();
    que.pop();
    int u = p.second;
    if (deg[u] == 0) {
      i++;
      continue;
    }
    int tmp = -p.first;
    pre_dfs(u, 0);
    if (val[u] != tmp) {
      i++;
      que.push({-val[u], u});
      continue;
    }
    ans[i] = ans[i + 1] + p.first;
    while (nxt[u]) {
      removed[u] = 1;
      deg[u]--;
      u = nxt[u];
      deg[u]--;
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
