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 = 500005;
int first[N], tot, n, mxv, rt, x, y, vis[N], sum[N], v[N], d[N], fa[N], sz[N],
    ans[N], ne[N << 1], zz[N << 1];
pair<int, int> mx1[N], mx2[N], q[N * 4];
void jb(int x, int y) {
  ne[++tot] = first[x];
  first[x] = tot;
  zz[tot] = y;
}
void dfs(int x) {
  mx1[x] = mx2[x] = pair<int, int>(0, x);
  for (int i = first[x]; i; i = ne[i])
    if (zz[i] != fa[x]) {
      fa[zz[i]] = x;
      dfs(zz[i]);
      pair<int, int> tmp = make_pair(mx1[zz[i]].first + 1, zz[i]);
      if (tmp > mx1[x]) swap(mx1[x], tmp);
      if (tmp > mx2[x]) swap(mx2[x], tmp);
    }
}
void dfs2(int x) {
  for (int i = first[x]; i; i = ne[i])
    if (zz[i] != fa[x]) {
      pair<int, int> tmp((mx1[x].second == zz[i] ? mx2[x] : mx1[x]).first + 1,
                         x);
      if (tmp > mx1[zz[i]]) swap(mx1[zz[i]], tmp);
      if (tmp > mx2[zz[i]]) swap(mx2[zz[i]], tmp);
      dfs2(zz[i]);
    }
}
int calc(int x, int y) {
  return mx1[x].second == y ? mx2[x].first : mx1[x].first;
}
void dfs(int x, int fa, int n) {
  sz[x] = 1;
  int mx = 0;
  for (int i = first[x]; i; i = ne[i])
    if (zz[i] != fa && !vis[zz[i]]) {
      dfs(zz[i], x, n);
      sz[x] += sz[zz[i]];
      mx = max(mx, sz[zz[i]]);
    }
  mx = max(mx, n - sz[x]);
  if (mx < mxv) mxv = mx, rt = x;
}
void solve(int x, int n) {
  mxv = 1 << 30;
  dfs(x, 0, n);
  vis[x = rt] = 1;
  int top = 0;
  for (int i = first[x]; i; i = ne[i]) {
    q[++top] = make_pair(calc(zz[i], x) + 1, 0);
    if (!vis[zz[i]]) {
      sum[zz[i]] = 0;
      for (int j = first[zz[i]]; j; j = ne[j])
        q[++top] = make_pair(calc(zz[j], zz[i]) + 1, zz[i]);
    }
  }
  sort(q + 1, q + top + 1);
  int tg = -2, mx = 0;
  for (int i = top; i; i--) {
    if (q[i].second == 0)
      tg++;
    else
      mx = max(mx, ++sum[q[i].second]);
    ans[q[i].first * 2] = max(ans[q[i].first * 2], tg + mx);
  }
  for (int i = first[x]; i; i = ne[i])
    if (!vis[zz[i]]) solve(zz[i], (sz[zz[i]] > sz[x] ? n - sz[x] : sz[zz[i]]));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    jb(x, y);
    jb(y, x);
    d[x]++;
    d[y]++;
  }
  for (int i = 1; i <= n; i++) ans[1] = max(ans[1], d[i] + 1);
  ans[n] = max(ans[n], 1);
  ans[n - 1] = max(ans[n - 1], 1);
  dfs(1);
  dfs2(1);
  for (int i = 1; i <= n; i++) {
    v[0] = 0;
    for (int j = first[i]; j; j = ne[j]) v[++v[0]] = calc(zz[j], i) + 1;
    sort(v + 1, v + v[0] + 1);
    for (int j = 1; j <= v[0]; j++) {
      ans[2 * v[j]] = max(ans[2 * v[j]], v[0] - j + 1);
      ans[2 * v[j] - 1] = max(ans[2 * v[j] - 1],
                              v[0] - j + 1 + (j != 1 && v[j - 1] == v[j] - 1));
      if (j != v[0] && v[j] != v[j + 1])
        ans[2 * v[j] + 1] = max(ans[2 * v[j] + 1], v[0] - j + 1);
    }
  }
  solve(1, n);
  for (int i = n; i; i--) ans[i] = max(ans[i], ans[i + 2]);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
}