#include <bits/stdc++.h>
using namespace std;
const int MAX = 1E5 + 9;
vector<int> adj[MAX];
int id[MAX];
int num[MAX];
int nChain(1);
int N;
int d[MAX];
int dep[MAX];
int pos;
void findMax(int u, int prev) {
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v != prev) {
      d[v] = d[u] + 1;
      if (d[v] > d[pos]) pos = v;
      findMax(v, u);
    }
  }
}
void previsit(int u, int prev) {
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v != prev) {
      previsit(v, u);
      dep[u] = max(dep[u], dep[v] + 1);
    }
  }
}
void hld(int u, int prev) {
  id[u] = nChain;
  ++num[nChain];
  int next = -1;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v != prev)
      if (next == -1 || dep[v] > dep[next]) next = v;
  }
  if (next != -1) hld(next, u);
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v != prev && v != next) {
      ++nChain;
      hld(v, u);
    }
  }
}
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  findMax(1, 1);
  memset(d, sizeof(int), sizeof(d));
  previsit(pos, pos);
  nChain = 1;
  hld(pos, pos);
  vector<int> result(N);
  sort(num + 1, num + 1 + N, greater<int>());
  for (int i = 1; i < N; i++) result[i] = min(N, result[i - 1] + num[i]);
  result[0] = 1;
  for (int i = 0; i < result.size(); i++) printf("%d ", result[i]);
  cout << '\n';
  return 0;
}
