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 = 555555;
const int inf = N * 2;
int n, f[N], g[N], dp1[N], dp2[N], ans[N];
char s[N];
vector<int> G[N], d[N];
map<int, int> mp[N];
void up(int& x, int y) {
  if (y > x) x = y;
}
void dfs1(int u, int last) {
  f[u] = 0;
  for (int& v : G[u])
    if (v != last) {
      dfs1(v, u);
      d[u].push_back(f[v] + 1);
      f[u] = max(f[u], f[v] + 1);
      if (f[v] > f[dp1[u]])
        dp2[u] = dp1[u], dp1[u] = v;
      else if (f[v] > f[dp2[u]])
        dp2[u] = v;
    }
}
void dfs2(int u, int last) {
  for (int& v : G[u])
    if (v != last) {
      if (v == dp1[u])
        g[v] = max(g[u] + 1, f[dp2[u]] + 2);
      else
        g[v] = max(g[u] + 1, f[dp1[u]] + 2);
      d[v].push_back(g[v]);
      dfs2(v, u);
    }
}
int main() {
  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);
  }
  f[0] = -inf;
  dfs1(1, 0);
  dfs2(1, 0);
  for (int i = 1; i <= n; i++) ans[i] = 1;
  for (int i = 1; i <= n; i++) up(ans[1], ((int)(G[i]).size()) + 1);
  for (int i = 1; i <= n; i++) sort(d[i].begin(), d[i].end(), greater<int>());
  for (int i = 1; i <= n; i++) {
    int tmp = 0;
    for (int j = 0; j < ((int)(d[i]).size()); j++) {
      int x = d[i][j];
      tmp++;
      up(ans[x * 2 - 1], tmp);
      up(ans[x * 2], tmp);
      up(ans[x], 2);
      if (j > 0 && d[i][j - 1] >= x + 1) up(ans[x * 2 + 1], tmp);
      if (j < ((int)(d[i]).size()) - 1 && d[i][j + 1] >= x - 1)
        up(ans[x * 2 - 1], tmp + 1);
      mp[i][x] = tmp;
    }
  }
  int tot = 0;
  for (int u = 1; u <= n; u++) {
    vector<pair<int, int> > vv[2];
    for (auto& pr : mp[u]) vv[0].push_back(pr);
    for (int& v : G[u])
      if (v > u) {
        vv[1].clear();
        for (auto& pr : mp[v]) vv[1].push_back(pr);
        int mx[2] = {0, 0},
            q[2] = {((int)(vv[0]).size()) - 1, ((int)(vv[1]).size()) - 1};
        while (q[0] >= 0 || q[1] >= 0) {
          int t =
              q[1] == -1 || (q[0] >= 0 && vv[0][q[0]].first > vv[1][q[1]].first)
                  ? 0
                  : 1;
          up(mx[t], vv[t][q[t]].second);
          up(ans[vv[t][q[t]].first * 2], mx[0] + mx[1] - 2);
          q[t]--;
        }
      }
  }
  for (int i = n - 2; i >= 1; i--) up(ans[i], ans[i + 2]);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
}