#include <bits/stdc++.h>
using namespace std;
namespace output {
void pr(int x) { cout << x; }
void pr(long x) { cout << x; }
void pr(long long x) { cout << x; }
void pr(unsigned x) { cout << x; }
void pr(unsigned long x) { cout << x; }
void pr(unsigned long long x) { cout << x; }
void pr(float x) { cout << x; }
void pr(double x) { cout << x; }
void pr(long double x) { cout << x; }
void pr(char x) { cout << x; }
void pr(const char* x) { cout << x; }
void pr(const string& x) { cout << x; }
void pr(bool x) { pr(x ? "true" : "false"); }
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T>
void pr(const T& x);
template <class T, class... Ts>
void pr(const T& t, const Ts&... ts) {
  pr(t);
  pr(ts...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("{", x.first, ", ", x.second, "}");
}
template <class T>
void pr(const T& x) {
  pr("{");
  bool fst = 1;
  for (const auto& a : x) pr(!fst ? ", " : "", a), fst = 0;
  pr("}");
}
void ps() { pr("\n"); }
template <class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(" ");
  ps(ts...);
}
void pc() { cout << "]" << endl; }
template <class T, class... Ts>
void pc(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(", ");
  pc(ts...);
}
}  // namespace output
using namespace output;
const int MX = 100005;
int n;
vector<int> adj[MX];
pair<long long, long long> dep[MX];
bool marked[MX];
long long ans[MX], anc[MX];
pair<long long, long long> best = {-1, -1};
multiset<pair<long long, long long> > pq;
long long ret = 1;
void dfs_init(int v, int p, long long d) {
  if (d > best.second) best = {v, d};
  for (int to : adj[v]) {
    if (to != p) {
      dfs_init(to, v, d + 1);
    }
  }
}
void dfs_dep(int v, int p) {
  dep[v] = {v, 0};
  for (int to : adj[v]) {
    if (to != p) {
      anc[to] = v;
      dfs_dep(to, v);
      if (dep[to].second + 1 > dep[v].second)
        dep[v] = {dep[to].first, dep[to].second + 1};
    }
  }
}
void push(int v) {
  for (int to : adj[v]) {
    if (to != anc[v] && !marked[to]) {
      pq.insert({dep[to].second, dep[to].first});
    }
  }
}
void tri(int it) {
  if (!pq.empty()) {
    auto curr = (--pq.end());
    int end = curr->second;
    pq.erase(curr);
    while (!marked[end]) {
      marked[end] = true;
      ++ret;
      push(end);
      end = anc[end];
    }
  }
  ans[it] = ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v), adj[v].push_back(u);
  }
  dfs_init(0, -1, 0);
  dfs_dep(best.first, -1);
  ans[0] = ret;
  marked[best.first] = true;
  push(best.first);
  for (int i = 1; i < n; i++) {
    tri(i);
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << '\n';
}
