#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, Max, root, ans = 1;
vector<int> edge[N];
int f[N];
bool visit[N];
priority_queue<pair<int, int> > pq;
void dfs(int u, int pa) {
  for (auto& v : edge[u])
    if (v != pa) {
      f[v] = f[u] + 1;
      dfs(v, u);
    }
}
void dfs1(int u, int pa) {
  for (auto& v : edge[u])
    if (v != pa) {
      dfs1(v, u);
      f[u] = max(f[u], f[v] + 1);
    }
  if (u != root) pq.push(pair<int, int>(f[u], u));
}
void dfs_true(int u, int pa) {
  visit[pa] = true;
  ans++;
  if (!f[u]) visit[u] = true;
  for (auto& v : edge[u])
    if (f[v] == f[u] - 1 && !visit[u]) dfs_true(v, u);
}
int main() {
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int u, v;
    cin >> u >> v;
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  dfs(1, 1);
  for (int i = 1; i <= n; ++i) {
    if (Max < f[i]) {
      Max = f[i];
      root = i;
    }
    f[i] = 0;
  }
  dfs1(root, root);
  visit[root] = true;
  cout << "1 ";
  n--;
  while (n--) {
    while (!pq.empty() && visit[pq.top().second]) pq.pop();
    if (pq.empty()) {
      cout << ans << ' ';
      continue;
    }
    dfs_true(pq.top().second, 0);
    pq.pop();
    cout << ans << ' ';
  }
}
