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 = 734343;
vector<int> G[N], H[N];
vector<pair<int, int>> H1[N];
int deg[N], ans[N], dep[N], p[N], down[N];
int n;
void dfs(int x) {
  down[x] = 1;
  ans[1] = max(ans[1], int(G[x].size()) + 1);
  for (auto y : G[x]) {
    if (y == p[x]) continue;
    p[y] = x;
    dep[y] = dep[x] + 1;
    dfs(y);
    down[x] = max(down[x], down[y] + 1);
  }
}
void dfs1(int x) {
  int max1 = 0, max2 = 0;
  int max3 = 0, max4 = 0;
  for (auto y : G[x]) {
    if (y == p[x]) continue;
    H[x].push_back(down[y]);
    if (down[y] > max3) {
      max4 = max3;
      max3 = down[y];
    } else if (down[y] > max4) {
      max4 = down[y];
    }
  }
  sort(H[x].begin(), H[x].end(), greater<int>());
  int cnt = 0, lastp = -1, j = 0;
  for (auto it : H[x]) {
    ++j;
    ans[it * 2] = max(ans[it * 2], j);
    if (it != lastp) {
      if (cnt) {
        ans[it * 2 + 1] = max(ans[it * 2 + 1], j);
      }
      lastp = it;
      cnt = 0;
    } else {
      ans[it * 2 - 1] = max(ans[it * 2 - 1], j);
    }
    ++cnt;
    if (max1 == 0)
      max1 = it;
    else if (max2 == 0)
      max2 = it;
  }
  for (auto y : G[x]) {
    if (y == p[x]) continue;
    if (down[y] == max1)
      H[y].push_back(max2 + 1);
    else
      H[y].push_back(max1 + 1);
    dfs1(y);
  }
  cnt = 0;
  if (p[x])
    for (int i = 1; i <= max4; ++i) {
      int temp =
          upper_bound(H[p[x]].begin(), H[p[x]].end(), i, greater<int>()) -
          H[p[x]].begin();
      temp += upper_bound(H[x].begin(), H[x].end(), i, greater<int>()) -
              H[x].begin();
      ans[i * 2] = max(ans[i * 2], temp - 2);
    }
}
int main() {
  int cases = 1;
  for (int iii = 1; iii <= cases; ++iii) {
    scanf("%d", &n);
    for (int i = 1; i < n; ++i) {
      int x, y;
      scanf("%d%d", &x, &y);
      G[x].push_back(y);
      G[y].push_back(x);
    }
    p[1] = 0;
    dfs(1);
    dfs1(1);
    for (int i = n; i >= 1; --i) {
      ans[i] = max(ans[i], ans[i + 2]);
      ans[i] = max(ans[i], 1);
    }
    for (int i = 1; i <= n; ++i) {
      printf("%d%c", ans[i], " \n"[i == n]);
    }
  }
}