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 mod = 1e9 + 7;
const int maxn = 5e5 + 5;
inline int mul(int x, int y) {
  long long z = 1LL * x * y;
  return z - z / mod * mod;
}
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline void upd(int &x, int y) { x = max(x, y); }
vector<int> g[maxn];
map<int, int> q[maxn];
int d[maxn], sz[maxn];
int ans[maxn];
void dfs0(int u, int fa) {
  d[u] = 0;
  q[u][0]++;
  for (auto v : g[u]) {
    if (v == fa) continue;
    dfs0(v, u);
    d[u] = max(d[u], d[v] + 1);
    q[u][d[v] + 1]++;
  }
}
void dfs1(int u, int fa, int pre) {
  pair<int, int> mx0, mx1;
  mx0 = pair<int, int>(pre, fa);
  mx1 = pair<int, int>(-1, -1);
  for (auto v : g[u]) {
    if (v == fa) continue;
    if (d[v] + 1 > mx0.first) {
      mx1 = mx0;
      mx0 = pair<int, int>(d[v] + 1, v);
    } else if (d[v] + 1 > mx1.first)
      mx1 = pair<int, int>(d[v] + 1, v);
  }
  if (pre != 0) q[u][pre]++;
  for (auto &e : q[u]) {
    swap(e.second, sz[u]);
    sz[u] += e.second;
  }
  int x = 0, m = sz[u];
  pair<int, int> lst = pair<int, int>(-100, 0);
  for (auto e : q[u]) {
    int y = m - e.second;
    if (pre >= e.first) y--;
    auto wr = q[fa].lower_bound(e.first);
    int w = 0;
    if (wr != q[fa].end()) {
      w = sz[fa] - (*wr).second;
    }
    upd(ans[e.first * 2], w + y - 1);
    if (lst.first >= 0) {
      upd(ans[lst.first * 2 + 1], m - e.second + 1);
      upd(ans[lst.first * 2], m - e.second + 1);
    }
    upd(ans[e.first * 2], m - e.second);
    if (e.first > 0) upd(ans[e.first * 2 - 1], m - e.second);
    lst = e;
  }
  map<int, int> sq;
  for (auto v : g[u]) {
    if (v == fa) continue;
    if (v == mx0.second)
      dfs1(v, u, mx1.first + 1);
    else
      dfs1(v, u, mx0.first + 1);
    for (auto e : q[v]) sq[e.first] = max(sq[e.first], e.second);
  }
  vector<pair<int, int> > sf;
  for (auto e : sq) sf.push_back(e);
  int ll = sf.size();
  for (int i = ll - 2; i >= 0; --i)
    sf[i].second = max(sf[i].second, sf[i + 1].second);
  for (auto e : q[u]) {
    int sk = lower_bound(sf.begin(), sf.end(), pair<int, int>(e.first, 0)) -
             sf.begin();
    if (sk >= ll) break;
    upd(ans[e.first * 2], sf[sk].second - 1 + m - e.second);
  }
  q[u].clear();
  q[u][0]++;
  for (auto v : g[u]) {
    if (v == fa) continue;
    q[u][d[v] + 1]++;
  }
  sz[u] = 0;
  for (auto &e : q[u]) {
    swap(e.second, sz[u]);
    sz[u] += e.second;
  }
  for (auto &e : q[u]) e.second = sz[u] - e.second;
}
int main() {
  int n, u, v;
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  ans[n] = 1;
  ans[n - 1] = 1;
  dfs0(1, 0);
  dfs1(1, 0, 0);
  for (int i = n - 1; i > 0; --i) ans[i] = max(ans[i], ans[i + 2]);
  for (int i = 1; i <= n; ++i) printf("%d%c", ans[i], " \n"[i == n]);
  ;
  return 0;
}