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;
int n, dp[600000], rl[600000], gl[600000];
vector<int> e[600000], l[600000];
vector<pair<int, int>> h[600000];
void add(int i, int v) {
  if (v <= 1) return;
  gl[v] = max(gl[v], i);
}
void remove(int i, int v) {
  if (v <= 1) return;
  rl[v] = max(rl[v], i);
}
void dfs(int i = 0, int p = -1) {
  dp[i] = 1;
  l[i].push_back(0);
  for (int j : e[i]) {
    if (j == p) continue;
    dfs(j, i);
    l[i].push_back(dp[j]);
    dp[i] = max(dp[i], dp[j] + 1);
  }
}
void down(int i = 0, int p = -1, int pl = -1) {
  if (p != -1) l[i].push_back(pl + 1);
  sort(l[i].begin(), l[i].end());
  for (int j : e[i]) {
    if (j == p) continue;
    if (dp[j] == l[i].back())
      down(j, i, l[i][((int)(l[i]).size()) - 2]);
    else
      down(j, i, l[i].back());
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  cin >> n;
  int a, b;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b, a--, b--;
    e[a].push_back(b);
    e[b].push_back(a);
  }
  dfs();
  down();
  for (int i = 0; i < n; i++) {
    int j = 0;
    int la = 0;
    while (j < ((int)(l[i]).size())) {
      h[i].push_back({l[i][j], ((int)(l[i]).size()) - j});
      if (l[i][j] > 0) {
        for (int k : e[i]) {
          int kk = l[k].end() - lower_bound(l[k].begin(), l[k].end(), l[i][j]);
          add(2 * l[i][j] + 1, ((int)(l[i]).size()) - j - 1 + kk - 1);
        }
        remove(2 * la + 2, ((int)(l[i]).size()) - j + 1);
        add(2 * l[i][j] + 1, ((int)(l[i]).size()) - j);
        remove(2 * l[i][j] + 1, ((int)(l[i]).size()) - j);
      }
      la = l[i][j];
      while (j < ((int)(l[i]).size()) && la == l[i][j]) j++;
    }
  }
  int ind = n + 20, indd = n + 20;
  rl[1] = n + 1;
  gl[1] = n + 1;
  for (int i = 1; i <= n; i++) {
    while (rl[ind] <= i) ind--;
    while (gl[indd] <= i) indd--;
    cout << (((i & 1) == 1) ? ind : indd) << (i < n ? " " : "\n");
  }
}