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>
const int N = 500005;
int to[N << 1], edge, Next[N << 1], last[N], n, x, y, d[N], mx1[N], mx2[N];
int f[N], fmx[N], ans1, mx[N], f0[N], f1[N], sum[N];
std::vector<int> e[N];
void upd(int &x, int y) {
  if (y > x) x = y;
}
void add(int x, int y) {
  to[++edge] = y;
  Next[edge] = last[x];
  last[x] = edge;
}
void dfs1(int x, int y) {
  f[x] = y;
  for (int i = last[x]; i; i = Next[i]) {
    int u = to[i];
    if (u == y) continue;
    dfs1(u, x);
    if (mx1[u] + 1 > mx1[x])
      mx2[x] = mx1[x], mx1[x] = mx1[u] + 1;
    else if (mx1[u] + 1 > mx2[x])
      mx2[x] = mx1[u] + 1;
  }
}
void dfs2(int x, int y) {
  if (y) e[fmx[x]].push_back(x);
  for (int i = last[x]; i; i = Next[i]) {
    int u = to[i];
    if (u == y) continue;
    if (mx1[x] == mx1[u] + 1)
      fmx[u] = std::max(mx2[x], fmx[x]) + 1;
    else
      fmx[u] = std::max(mx1[x], fmx[x]) + 1;
    e[mx1[u] + 1].push_back(x);
  }
  for (int i = last[x]; i; i = Next[i])
    if (to[i] != y) dfs2(to[i], x);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y), add(y, x);
    d[x]++, d[y]++;
  }
  for (int i = 1; i <= n; i++) upd(ans1, d[i] + 1);
  dfs1(1, 0);
  dfs2(1, 0);
  f0[n] = f1[n] = 1;
  for (int i = n; i >= 1; i--) {
    int lst = 0;
    for (auto u : e[i]) {
      sum[u]++;
      upd(f0[i], sum[u]);
      upd(f1[i - 1], sum[u]);
      if (lst != u) upd(f1[i], sum[u]);
      upd(mx[f[u]], sum[u]);
      upd(f0[i], sum[u] + mx[u] - 2);
      if (f[u]) upd(f0[i], sum[u] + sum[f[u]] - 2);
      lst = u;
    }
  }
  for (int i = n; i >= 1; i--) upd(f0[i], f0[i + 1]), upd(f1[i], f1[i + 1]);
  printf("%d ", ans1);
  for (int i = 2; i <= n; i++)
    if (i & 1)
      printf("%d ", f1[i / 2]);
    else
      printf("%d ", f0[i / 2]);
}