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;
class DebugStream {
} LOG;
template <typename T>
DebugStream& operator<<(DebugStream& s, const T&) {
  return s;
}
mt19937 rnd(time(NULL));
const int maxN = 5e5 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;
vector<int> adj[maxN];
map<int, int> mps[maxN];
int n, dep[maxN], ans[maxN], diam;
void prec(int nd, int an) {
  if (an != -1) adj[nd].erase(find(adj[nd].begin(), adj[nd].end(), an));
  for (int sn : adj[nd])
    prec(sn, nd), dep[nd] = max(dep[nd], dep[sn] + 1), mps[nd][dep[sn] + 1]++;
}
void ot(int nd, int toc) {
  set<pair<int, int> > mys;
  if (toc) mps[nd][toc]++;
  for (int sn : adj[nd]) mys.insert(pair<int, int>(1 + dep[sn], sn));
  mys.insert(pair<int, int>(0, -1)), mys.insert(pair<int, int>(0, -2));
  for (int sn : adj[nd]) {
    mys.erase(pair<int, int>(1 + dep[sn], sn));
    ot(sn, max(toc, mys.rbegin()->first) + 1);
    mys.insert(pair<int, int>(1 + dep[sn], sn));
  }
  int cr = mys.rbegin()->first;
  mys.erase(*mys.rbegin());
  diam = max(diam, cr + mys.rbegin()->first);
  int acu = 0;
  for (auto it = mps[nd].rbegin(); it != mps[nd].rend(); it++) {
    if (acu) ans[it->first * 2 + 1] = max(ans[it->first * 2 + 1], 1 + acu);
    acu += it->second;
    it->second = acu;
    ans[2 * it->first] = max(ans[2 * it->first], acu);
  }
  mps[nd][MOD] = 0;
}
void procesa(map<int, int>& one, map<int, int>& two) {
  for (auto el : one) {
    if (el.first == MOD) break;
    auto canti = two.lower_bound(el.first)->second;
    ans[el.first * 2] = max(ans[el.first * 2], canti + el.second - 2);
  }
}
void dfs(int nd) {
  map<int, int> ovr;
  for (int sn : adj[nd]) {
    procesa(mps[sn], mps[nd]);
    dfs(sn);
    for (auto el : mps[sn]) ovr[el.first] = max(ovr[el.first], el.second);
  }
  int acu = 0;
  for (auto it = ovr.rbegin(); it != ovr.rend(); it++) {
    acu = max(acu, it->second);
    it->second = acu;
  }
  if (ovr.size()) procesa(mps[nd], ovr);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) ans[i] = 1;
  for (int i = 1, u, v; i < n; i++) {
    cin >> u >> v, u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int card =
      max_element(adj, adj + n, [](const vector<int>& a, const vector<int>& b) {
        return a.size() < b.size();
      })->size();
  prec(0, -1);
  ot(0, 0);
  for (int i = 2; i <= diam; i++) ans[i] = max(ans[i], 2);
  for (int i = n - 1; i >= 2; i--) ans[i] = max(ans[i], ans[i + 1]);
  for (int i = 0; i < n; i++) {
    if (i + 1 != 9 && i + 1 != 12) continue;
    LOG << '\n' << "wacha " << i + 1 << "\n\n";
    for (auto el : mps[i]) LOG << el.first << ' ' << el.second << '\n';
  }
  dfs(0);
  for (int i = n - 2; i >= 2; i--) ans[i] = max(ans[i], ans[i + 2]);
  ans[1] = card + 1;
  for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
  cout << '\n';
}