Problem: Let G be a simple graph. Let W be a non-empty subset of vertices. Then W is almost-k-uniform if for each pair of distinct vertices u,v ∈ W the distance between u and v is either k or k+1.

You are given a tree on n vertices. For each i between 1 and n, find the maximum size of an almost-i-uniform set.

Input

The first line contains a single integer n (2 ≤ n ≤ 5 ⋅ 10^5) – the number of vertices of the tree.

Then n-1 lines follows, the i-th of which consisting of two space separated integers u_i, v_i (1 ≤ u_i, v_i ≤ n) meaning that there is an edge between vertices u_i and v_i. 

It is guaranteed that the given graph is tree. 

Output

Output a single line containing n space separated integers a_i, where a_i is the maximum size of an almost-i-uniform set.

Examples

Input


5
1 2
1 3
1 4
4 5


Output


4 3 2 1 1


Input


6
1 2
1 3
1 4
4 5
4 6


Output


4 4 2 1 1 1

Note

Consider the first example. 

  * The only maximum almost-1-uniform set is \{1, 2, 3, 4\}. 
  * One of the maximum almost-2-uniform sets is or \{2, 3, 5\}, another one is \{2, 3, 4\}. 
  * A maximum almost-3-uniform set is any pair of vertices on distance 3. 
  * Any single vertex is an almost-k-uniform set for k ≥ 1. 



In the second sample there is an almost-2-uniform set of size 4, and that is \{2, 3, 5, 6\}.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > data;
vector<vector<int> > sticks;
vector<int> h;
int dfs(int vertex, int last) {
  int longest = 0;
  for (int i = 0; i < data[vertex].size(); ++i) {
    int to = data[vertex][i];
    if (to == last) continue;
    int len = dfs(to, vertex) + 1;
    sticks[vertex].push_back(len);
    longest = max(longest, len);
  }
  h[vertex] = longest;
  return longest;
}
void dfs2(int vertex, int last, int fup) {
  if (vertex != 0) {
    sticks[vertex].push_back(fup);
  }
  fup++;
  int mx1 = -100, mx2 = -100;
  for (int i = 0; i < data[vertex].size(); ++i) {
    int to = data[vertex][i];
    if (to == last) continue;
    if (h[to] + 1 > mx1) {
      mx2 = mx1;
      mx1 = h[to] + 1;
    } else
      mx2 = max(mx2, h[to] + 1);
  }
  for (int i = 0; i < data[vertex].size(); ++i) {
    int to = data[vertex][i];
    if (to == last) continue;
    if (h[to] + 1 != mx1) {
      dfs2(to, vertex, max(fup, mx1 + 1));
    } else
      dfs2(to, vertex, max(fup, mx2 + 1));
  }
}
int dfslong, dfslen;
void dfs3(int vertex, int last, int d) {
  if (d > dfslen) {
    dfslen = d, dfslong = vertex;
  }
  for (int i = 0; i < data[vertex].size(); ++i) {
    int to = data[vertex][i];
    if (to == last) continue;
    dfs3(to, vertex, d + 1);
  }
}
int find_diameter() {
  dfslong = 0, dfslen = 0;
  dfs3(0, -1, 0);
  int Q = dfslong;
  dfs3(dfslong, -1, 0);
  return dfslen;
}
vector<bool> deleted;
void dlt(int first) { deleted[first] = true; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  data.assign(n, {});
  sticks.assign(n, {});
  h.assign(n, {});
  deleted.assign(n, false);
  vector<pair<int, int> > edges;
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    if (u > v) swap(u, v);
    u--, v--;
    data[u].push_back(v), data[v].push_back(u);
    edges.push_back({u, v});
  }
  dfs(0, -1);
  dfs2(0, -1, 0);
  for (int i = 0; i < n; ++i) {
    sort(sticks[i].begin(), sticks[i].end(), greater<int>());
  }
  vector<pair<int, int> > kek;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < sticks[i].size(); ++j) {
      kek.push_back({sticks[i][j], i});
    }
  }
  sort(kek.begin(), kek.end());
  int d = find_diameter();
  for (int i = 0; i < n; ++i) {
    if (data[i].size() <= 2) dlt(i);
  }
  set<pair<int, int> > W;
  for (int i = 0; i < n; ++i) {
    W.insert({-sticks[i].size(), i});
  }
  auto thtol = W.begin();
  cout << -(*thtol).first + 1 << " ";
  int u = 0;
  vector<int> stake;
  for (int k = 2; k <= n; ++k) {
    if (k > d) {
      cout << 1 << " ";
      continue;
    }
    if (k % 2 == 0) {
      while (u < kek.size() && kek[u].first < k / 2) {
        stake.push_back(kek[u++].second);
      }
      for (int i = 0; i < stake.size(); ++i) {
        int T = stake[i];
        W.erase(W.find({-sticks[T].size(), T}));
        while (sticks[T].size() && sticks[T].back() < k / 2)
          sticks[T].pop_back();
        if (sticks[T].size() <= 2) dlt(T);
        W.insert({-sticks[T].size(), T});
      }
      auto aaa = W.begin();
      int tut = max(2, -(*aaa).first);
      int st = 0;
      while (st < edges.size()) {
        int A = edges[st].first, B = edges[st].second;
        if (deleted[A] || deleted[B]) {
          swap(edges[st], edges.back());
          edges.pop_back();
          continue;
        }
        tut = max(tut, (int)(sticks[A].size() + sticks[B].size() - 2));
        st++;
      }
      cout << tut << " ";
      stake.clear();
    } else {
      while (u < kek.size() && kek[u].first < (k + 1) / 2) {
        stake.push_back(kek[u++].second);
      }
      for (int i = 0; i < stake.size(); ++i) {
        int T = stake[i];
        W.erase(W.find({-sticks[T].size(), T}));
        while (sticks[T].size() > 1 &&
               sticks[T][sticks[T].size() - 2] < (k + 1) / 2)
          sticks[T].pop_back();
        if (sticks[T].size() <= 2) dlt(T);
        W.insert({-sticks[T].size(), T});
      }
      auto aaa = W.begin();
      int tut = max(2, -(*aaa).first);
      cout << tut << " ";
    }
  }
}