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 data {
  int to, head;
} e[1100000];
struct data1 {
  int lab, d;
} p[1100000][2];
int n, len, head[1100000], sz[1100000], d[1100000], ans[1100000];
vector<int> ve[1100000], s[1100000];
void add(int u, int v) {
  e[++len].to = v;
  e[len].head = head[u];
  head[u] = len;
}
void dealp(int i) {
  sort(ve[i].begin(), ve[i].end());
  sz[i] = ve[i].size();
  ve[i].resize(sz[i] + 1, 0);
  ans[ve[i][0] * 2] = max(sz[i], ans[ve[i][0] * 2]);
  ans[ve[i][0] * 2 - 1] = max(sz[i], ans[ve[i][0] * 2 - 1]);
  for (int j = 1; j < sz[i]; j++) {
    int pre = ve[i][j - 1], now = ve[i][j];
    if (pre != now) {
      ans[2 * now] = max(sz[i] - j, ans[2 * now]);
      if (pre == now - 1)
        ans[2 * now - 1] = max(sz[i] - j + 1, ans[2 * now - 1]);
      else
        ans[2 * now - 1] = max(sz[i] - j, ans[2 * now - 1]);
      ans[2 * pre + 1] = max(ans[2 * pre + 1], sz[i] - j + 1);
    }
  }
  int len = 0, num = 1;
  for (int j = 1; j < sz[i]; j++) {
    if (ve[i][j] != ve[i][j - 1]) {
      ve[i][len++] = ve[i][j - 1];
      s[i].push_back(num);
      num = 1;
    } else
      num++;
  }
  ve[i][len++] = ve[i][sz[i] - 1];
  s[i].push_back(num);
  sz[i] = len;
  s[i].resize(len);
  for (int j = 1; j < sz[i]; j++) s[i][j] = s[i][j - 1] + s[i][j];
}
void deale(int u, int v) {
  int x, m1, m2, sum;
  for (int i = 0, j = 0; i < sz[u] && j < sz[v];) {
    x = min(ve[u][i], ve[v][j]);
    sum = 0;
    sum += s[u][sz[u] - 1] - (i > 0 ? s[u][i - 1] : 0);
    sum += s[v][sz[v] - 1] - (j > 0 ? s[v][j - 1] : 0);
    ans[2 * x] = max(ans[2 * x], sum - 2);
    if (ve[u][i] <= ve[v][j])
      i++;
    else
      j++;
  }
}
void deal(int x, int dis, int lab) {
  if (dis >= p[lab][0].d) {
    p[lab][1] = p[lab][0];
    p[lab][0].d = dis;
    p[lab][0].lab = x;
  } else if (dis > p[lab][1].d) {
    p[lab][1].d = dis;
    p[lab][1].lab = x;
  }
}
void dfs1(int lab, int fa) {
  for (int i = head[lab]; i; i = e[i].head) {
    if (e[i].to == fa) continue;
    int x = e[i].to;
    dfs1(x, lab);
    ve[lab].push_back(d[x] + 1);
    deal(x, d[x] + 1, lab);
    d[lab] = max(d[lab], d[x] + 1);
  }
}
void dfs2(int lab, int fa) {
  if (p[fa][0].lab != lab && fa != 0) {
    ve[lab].push_back(p[fa][0].d + 1);
    deal(fa, p[fa][0].d + 1, lab);
  } else if (fa != 0) {
    ve[lab].push_back(p[fa][1].d + 1);
    deal(fa, p[fa][1].d + 1, lab);
  }
  for (int i = head[lab]; i; i = e[i].head) {
    if (e[i].to != fa) dfs2(e[i].to, lab);
  }
}
int main() {
  int u, v;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) ans[i] = 1;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  dfs1(1, 0);
  dfs2(1, 0);
  for (int i = 1; i <= n; i++) dealp(i);
  for (int i = 1; i <= n; i++) {
    int dick = 0;
    for (int j = head[i]; j; j = e[j].head) {
      if (e[j].to > i) deale(i, e[j].to);
      dick++;
    }
    ans[1] = max(ans[1], dick);
  }
  ans[1]++;
  for (int i = n - 2; i >= 1; i--) ans[i] = max(ans[i + 2], ans[i]);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
}