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 Edge {
  int v, nxt;
} e[1000010];
int tot;
int first[500010];
int deg[500010];
void build(int u, int v) {
  e[++tot] = (Edge){v, first[u]};
  first[u] = tot;
  deg[u]++;
  return;
}
int f[500010];
int g[500010];
int h[500010];
void dfs1(int u, int lst) {
  f[u] = g[u] = 0;
  for (int i = first[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == lst) continue;
    dfs1(v, u);
    if (f[v] + 1 > f[u]) {
      g[u] = f[u];
      f[u] = f[v] + 1;
    } else
      g[u] = max(g[u], f[v] + 1);
  }
  return;
}
void qmx(int& x, int y) {
  if (x < y) x = y;
  return;
}
map<int, int> cnt[500010];
int ans[1000010];
void solve1(int u) {
  map<int, int>::iterator it = cnt[u].begin();
  int num = deg[u];
  for (; it != cnt[u].end(); it++) {
    qmx(ans[(it->first) * 2 - 1], num);
    qmx(ans[(it->first) * 2], num);
    num -= it->second;
    if (it->second) qmx(ans[(it->first) * 2 + 1], num + 1);
  }
  return;
}
void solve2(int u, int v) {
  cnt[u][f[v] + 1]--;
  cnt[v][h[v]]--;
  map<int, int>::iterator it1 = cnt[u].begin();
  map<int, int>::iterator it2 = cnt[v].begin();
  int num = deg[u] + deg[v] - 2;
  while (it1 != cnt[u].end() || it2 != cnt[v].end()) {
    if (it1 == cnt[u].end()) {
      qmx(ans[(it2->first) * 2], num);
      num -= it2->second;
      it2++;
    } else if (it2 == cnt[v].end()) {
      qmx(ans[(it1->first) * 2], num);
      num -= it1->second;
      it1++;
    } else {
      int val = min(it1->first, it2->first);
      qmx(ans[val * 2], num);
      if (it1->first == val) {
        num -= it1->second;
        it1++;
      }
      if (it2->first == val) {
        num -= it2->second;
        it2++;
      }
    }
  }
  cnt[u][f[v] + 1]++;
  cnt[v][h[v]]++;
  return;
}
void dfs2(int u, int lst) {
  ans[1] = max(ans[1], deg[u] + 1);
  if (!lst)
    h[u] = 0;
  else {
    int val = f[lst];
    if (val == f[u] + 1) val = g[lst];
    h[u] = max(val, h[lst]) + 1;
    cnt[u][h[u]]++;
  }
  for (int i = first[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == lst) continue;
    cnt[u][f[v] + 1]++;
    dfs2(v, u);
  }
  solve1(u);
  for (int i = first[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == lst) continue;
    solve2(u, v);
  }
  return;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    build(u, v);
    build(v, u);
  }
  ans[n] = ans[n - 1] = 1;
  dfs1(1, 0);
  dfs2(1, 0);
  for (int i = n; i >= 1; i--) ans[i] = max(ans[i], ans[i + 2]);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}