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 maxn = 500500;
int n;
vector<int> g[maxn], p[maxn], q[maxn];
int pr[maxn];
int f[maxn], fu[maxn];
int D, L;
int c[maxn], cc[maxn];
int rs[maxn];
void pfs(int v, int par = -1) {
  pr[v] = par;
  for (int i = 0; i < g[v].size(); i++) {
    int u = g[v][i];
    if (u != par) {
      pfs(u, v);
      f[v] = max(f[v], f[u] + 1);
    } else {
      g[v][i] = g[v].back();
      g[v].pop_back();
      i--;
    }
  }
}
void qfs(int v) {
  int tmp = fu[v];
  for (int u : g[v]) {
    fu[u] = max(fu[u], tmp + 1);
    tmp = max(tmp, f[u] + 1);
  }
  reverse(g[v].begin(), g[v].end());
  tmp = fu[v];
  for (int u : g[v]) {
    fu[u] = max(fu[u], tmp + 1);
    tmp = max(tmp, f[u] + 1);
    qfs(u);
  }
}
int ask(int k) {
  if (k == 1) return D + 1;
  int ret = 1;
  if (L >= k) ret = 2;
  if (k % 2) return max(ret, c[k / 2 + 1]);
  return max(ret, max(c[k / 2], cc[k / 2]));
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int v, u;
    cin >> v >> u;
    v--, u--;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  for (int i = 0; i < n; i++) D = max(D, int(g[i].size()));
  pfs(0);
  qfs(0);
  for (int v = 0; v < n; v++) {
    for (int u : g[v]) p[v].push_back(f[u] + 1);
    q[v] = p[v];
    p[v].push_back(0);
    sort(p[v].begin(), p[v].end());
    q[v].push_back(fu[v]);
    sort(q[v].begin(), q[v].end());
    if (q[v].size() > 1)
      L = max(L, q[v][0] + q[v][1]);
    else
      L = max(L, q[v][0]);
  }
  for (int v = 0; v < n; v++) {
    for (int i = 0; i < q[v].size(); i++) {
      int x = q[v][i];
      c[x] = max(c[x], int(q[v].size()) - i);
      if (x and i + 1 < q[v].size() and x < q[v][i + 1])
        rs[x * 2 + 1] = max(rs[x * 2 + 1], int(q[v].size()) - i);
    }
    if (!v) continue;
    int d = pr[v];
    int up = 0;
    if (q[d].size() > 2) up = q[d][q[d].size() - 2];
    for (int i = 1; i + 1 < p[v].size(); i++) {
      for (int l = p[v][i - 1] + 1; l <= p[v][i]; l++) {
        int zz = q[d].end() - lower_bound(q[d].begin(), q[d].end(), l);
        cc[l] = max(cc[l], int(zz + (p[v].size() - i) - 1));
      }
    }
  }
  for (int i = n; i >= 0; i--) {
    c[i] = max(c[i], c[i + 1]);
    cc[i] = max(cc[i], cc[i + 1]);
  }
  for (int i = 1; i <= n; i++) cout << max(rs[i], ask(i)) << " ";
  cout << endl;
  return 0;
}