#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> g[N];
int dp[N], mx = -1, at, temp;
bool vis[N];
priority_queue<pair<int, int> > q;
void dfs(int u, int p, int d, bool b) {
  if (!b)
    dp[u] = d;
  else
    dp[u] = 0;
  if (dp[u] > mx) mx = dp[u], at = u;
  for (auto v : g[u]) {
    if (v != p) {
      dfs(v, u, d + 1, b);
      if (b) dp[u] = max(dp[u], dp[v] + 1);
    }
  }
  if (b && u != at) q.push({dp[u], u});
}
void dfs(int u, int p, int d) {
  vis[u] = 1;
  temp++;
  for (auto v : g[u]) {
    if (v != p && !vis[v] && dp[v] == d) {
      dfs(v, u, d - 1);
      break;
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0, a, b; i < n - 1; i++) {
    scanf("%d%d", &a, &b);
    g[a].push_back(b), g[b].push_back(a);
  }
  dfs(1, -1, 0, 0);
  vector<int> ans;
  ans.push_back(1);
  dfs(at, -1, 0, 1);
  temp = 1, vis[at] = 1;
  while (q.size()) {
    int u = q.top().second, d = q.top().first;
    q.pop();
    if (vis[u]) {
      continue;
    }
    dfs(u, -1, d - 1);
    ans.push_back(temp);
  }
  while (ans.size() < n) ans.push_back(n);
  for (auto i : ans) printf("%d ", i);
}
