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;
struct node {
  int per, to;
} e[1000010 << 1];
int n, q, tot;
int head[1000010], f[1000010], updep[1000010], ch[1000010], ans[1000010],
    dp[1000010];
pair<int, int> mx[1000010], secmx[1000010];
vector<int> vec[1000010];
void addedge(int from, int to) {
  e[++tot].to = to;
  e[tot].per = head[from];
  head[from] = tot;
}
int dfs1(int u, int fa, int dep) {
  f[u] = fa;
  int mxdep = dep;
  for (int i = head[u]; i > 0; i = e[i].per) {
    int v = e[i].to;
    if (v == fa) continue;
    int dd = dfs1(v, u, dep + 1);
    mxdep = max(mxdep, dd);
    pair<int, int> pa = make_pair(dd - dep, v);
    vec[dd - dep].push_back(u);
    if (mx[u].first < dd - dep) {
      secmx[u] = mx[u];
      mx[u] = pa;
    } else if (secmx[u].first < dd - dep) {
      secmx[u] = pa;
    }
  }
  return mxdep;
}
void dfs2(int u, int fa) {
  for (int i = head[u]; i > 0; i = e[i].per) {
    int v = e[i].to;
    if (v == fa) continue;
    updep[v] =
        1 + max(updep[u], v == mx[u].second ? secmx[u].first : mx[u].first);
    vec[updep[v]].push_back(v);
    dfs2(v, u);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  memset(head, -1, sizeof(head));
  cin >> n;
  for (int i = 1; i <= n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    addedge(u, v);
    addedge(v, u);
  }
  dfs1(1, 0, 0);
  dfs2(1, 0);
  for (int i = 1; i <= n; ++i) vec[0].push_back(i);
  int maxx = 0, t = 0;
  for (int i = n; i >= 0; --i) {
    ans[i * 2 + 1] = maxx;
    for (int v : vec[i]) {
      ans[i * 2 + 1] = max(ans[i * 2 + 1], dp[v] + 1);
    }
    for (int v : vec[i]) {
      maxx = max(maxx, ++dp[v]);
      t = max(t, dp[v] + ch[v] - 2);
      if (v != 1) {
        ch[f[v]] = max(ch[f[v]], dp[v]);
        t = max(t, dp[f[v]] + ch[f[v]] - 2);
      }
    }
    ans[2 * i] = max(maxx, t);
  }
  for (int i = 1; i <= n; ++i) cout << max(ans[i], 1) << " ";
  return 0;
}