#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
set<int> g[N];
int d[N], len[N];
queue<int> q;
int ans[N];
int main() {
  cin >> n;
  for (int i = 1, u, v; i < n; i++) {
    cin >> u >> v;
    g[u].insert(v);
    g[v].insert(u);
    d[u]++;
    d[v]++;
  }
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) q.push(i), len[i] = 1;
  int siz = q.size();
  for (int i = siz; i <= n; i++) ans[i] = n;
  int now = siz;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    if (g[u].empty()) break;
    int v = *g[u].begin();
    if (len[v] || g[v].size() > 2) {
      g[u].erase(v);
      g[v].erase(u);
      now--;
      ans[now] = ans[now + 1] - len[u];
    } else {
      g[u].erase(v);
      g[v].erase(u);
      len[v] = len[u] + 1;
      q.push(v);
    }
  }
  ans[1] = 1;
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
