#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 10;
vector<vector<int>> adjList(MAX);
vector<int> depth(MAX), mxgo(MAX);
void dfs1(int nd, int p = -1, int dpt = 0) {
  depth[nd] = dpt;
  mxgo[nd] = depth[nd];
  for (int cd : adjList[nd]) {
    if (cd != p) {
      dfs1(cd, nd, dpt + 1);
      mxgo[nd] = max(mxgo[nd], mxgo[cd]);
    }
  }
}
void dfs2(int nd, int p = -1, int dpt = 1) {
  int nxt = -1;
  for (int cd : adjList[nd]) {
    if (cd != p && mxgo[cd] == mxgo[nd]) {
      nxt = cd;
      break;
    }
  }
  if (nxt != -1) {
    dfs2(nxt, nd, dpt + 1);
    for (int cd : adjList[nd]) {
      if (cd != p && cd != nxt) {
        dfs2(cd, nd, 1);
      }
    }
    depth[nd] = 0;
  } else {
    depth[nd] = dpt;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adjList[u].push_back(v);
    adjList[v].push_back(u);
  }
  dfs1(0);
  int root = 0, curd = 0;
  for (int i = 0; i < n; i++) {
    if (depth[i] > curd) {
      curd = depth[i];
      root = i;
    }
  }
  dfs1(root);
  dfs2(root);
  vector<int> args;
  for (int i = 0; i < n; i++) {
    if (i != root) args.push_back(depth[i]);
  }
  sort(args.begin(), args.end(), greater<int>());
  vector<int> ans(n);
  ans[0] = 1;
  for (int i = 1, cur = 0; i < n; i++) {
    cur += args[i - 1];
    cur = min(cur, n);
    ans[i] = cur;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
