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;
const int N = 5e5 + 7;
void Max(int &x, int y) {
  if (x < y) x = y;
}
int n, deg[N], cnt[N], Fa[N], pnt[N], dep[N], g[N], f1[N], f2[N], sum[N],
    mxd[N], sxd[N], glen[N];
vector<int> tmp[N], G[N], e[N];
void dfs1(int x) {
  for (int v : e[x])
    if (v ^ Fa[x]) {
      Fa[v] = x, dfs1(v);
      if (mxd[v] + 1 > mxd[x])
        sxd[x] = mxd[x], mxd[x] = mxd[v] + 1;
      else if (mxd[v] + 1 > sxd[x])
        sxd[x] = mxd[v] + 1;
    }
}
void dfs2(int x) {
  if (x ^ 1) tmp[x].push_back(glen[x]);
  for (int v : e[x])
    if (v ^ Fa[x])
      tmp[x].push_back(mxd[v] + 1),
          glen[v] = max(glen[x], mxd[v] + 1 == mxd[x] ? sxd[x] : mxd[x]) + 1,
          dfs2(v);
}
void work(int x) {
  sort(tmp[x].begin(), tmp[x].end());
  for (int now : tmp[x]) cnt[now]++;
  int sz = tmp[x].size(), las = 0;
  for (int now : tmp[x])
    if (now ^ las) {
      Max(f1[now - 1], sz), Max(f1[now], sz - cnt[now] + 1), Max(f2[now], sz);
      sz -= cnt[now], las = now;
    }
  for (int now : tmp[x]) cnt[now]--;
}
int maxson[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1, iE = n; i <= iE; i++) f1[i] = f2[i] = 1, maxson[i] = -1e9;
  for (int i = 1, iE = n - 1; i <= iE; i++) {
    int u, v;
    cin >> u >> v, deg[u]++, deg[v]++, e[u].push_back(v), e[v].push_back(u);
  }
  dfs1(1), dfs2(1);
  for (int i = 1, iE = n; i <= iE; i++) Max(f1[0], deg[i] + 1), work(i);
  for (int i = 1, iE = n; i <= iE; i++)
    for (int t : tmp[i]) G[t].push_back(i);
  int las = 0;
  for (int i = n, iE = 1; i >= iE; i--) {
    for (int t : G[i]) {
      int tmp = (glen[t] >= i) + (mxd[t] + 1 >= i);
      sum[t]++, Max(maxson[Fa[t]], sum[t] - tmp);
      Max(f2[i], sum[t] + maxson[t]), Max(f2[i], sum[t] + sum[Fa[t]] - tmp),
          Max(f2[i], sum[t]), Max(f1[i - 1], sum[t]);
      if (las != t) Max(f1[i], sum[t]);
      las = t;
    }
  }
  for (int i = n, iE = 1; i >= iE; i--)
    Max(f1[i - 1], f1[i]), Max(f2[i - 1], f2[i]);
  for (int i = 1, iE = n; i <= iE; i++)
    if (i % 2)
      cout << f1[i / 2] << " ";
    else
      cout << f2[i / 2] << " ";
  cout << endl;
  return 0;
}