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 = 5e5 + 7;
void Max(int &x, int y) {
  if (x < y) x = y;
}
int n, deg[N];
int head[N], edge_id;
struct edge {
  int to, next;
} e[N << 1];
void add_edge(int u, int v) {
  ++edge_id, e[edge_id].next = head[u], e[edge_id].to = v, head[u] = edge_id;
}
int cnt[N], Fa[N], pnt[N], dep[N], g[N], f1[N], f2[N], sum[N];
struct SegmentTree {
  int seg[N << 2];
  void xg(int id, int L, int R, int wz, int val) {
    if (L == R) return seg[id] = val, void();
    int mid = (L + R) >> 1;
    if (wz <= mid)
      xg(id << 1, L, mid, wz, val);
    else
      xg(id << 1 | 1, mid + 1, R, wz, val);
    seg[id] = max(seg[id << 1], seg[id << 1 | 1]);
  }
  int get(int id, int L, int R, int l, int r) {
    if (l <= L && R <= r) return seg[id];
    int mid = (L + R) >> 1, res = 0;
    if (l <= mid) Max(res, get(id << 1, L, mid, l, r));
    if (r > mid) Max(res, get(id << 1 | 1, mid + 1, R, l, r));
    return res;
  }
  void change(int wz, int val) { xg(1, 1, n, wz, val); }
  int qry(int l, int r) { return get(1, 1, n, l, r); }
} seg;
vector<int> tmp[N], G[N];
int mxd[N], sxd[N], glen[N], maxn[N];
void dfs1(int x) {
  for (int i = head[x]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == Fa[x]) continue;
    Fa[v] = x, dfs1(v);
    if (mxd[v] + 1 > mxd[x])
      sxd[x] = mxd[x], mxd[x] = mxd[v] + 1;
    else if (mxd[v] + 1 > sxd[x])
      sxd[x] = mxd[v] + 1;
  }
}
void dfs2(int x) {
  if (x ^ 1) tmp[x].push_back(glen[x]);
  for (int i = head[x]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == Fa[x]) continue;
    tmp[x].push_back(mxd[v] + 1);
    glen[v] = max(glen[x], mxd[v] + 1 == mxd[x] ? sxd[x] : mxd[x]) + 1, dfs2(v);
  }
}
void work(int x) {
  sort(tmp[x].begin(), tmp[x].end());
  for (int now : tmp[x]) cnt[now]++;
  int sz = tmp[x].size(), las = 0, lassz = sz;
  for (int now : tmp[x]) {
    if (now == las) continue;
    Max(f1[now - 1], sz), Max(f1[now], sz - cnt[now] + 1), Max(f2[now], sz);
    sz -= cnt[now], las = now;
  }
  for (int now : tmp[x]) cnt[now]--;
}
int maxson[N], bfn[N], L[N], R[N], idtot;
void bfs() {
  queue<int> q;
  q.push(1);
  while (!q.empty()) {
    int u = q.front();
    q.pop(), bfn[u] = ++idtot;
    for (int i = head[u]; i; i = e[i].next) {
      int v = e[i].to;
      if (v == Fa[u]) {
        if (!L[v]) L[v] = idtot;
        R[v] = idtot;
        continue;
      }
      q.push(v);
    }
  }
}
void calc(int x) {
  for (int t : G[x]) {
    int tmp = (glen[t] >= x) + (mxd[t] + 1 >= x);
    sum[t]++, Max(maxson[Fa[t]], sum[t] - tmp);
    if (L[t])
      Max(f2[x], sum[t] + maxson[t]), Max(f2[x], sum[t] + sum[Fa[t]] - tmp);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1, iE = n; i <= iE; i++) f1[i] = f2[i] = 1, maxson[i] = -1e9;
  for (int i = 1, iE = n - 1; i <= iE; i++) {
    int u, v;
    cin >> u >> v, deg[u]++, deg[v]++;
    add_edge(u, v), add_edge(v, u);
  }
  dfs1(1), dfs2(1);
  for (int i = 1, iE = n; i <= iE; i++) Max(f1[0], deg[i] + 1);
  bfs();
  for (int i = 1, iE = n; i <= iE; i++) work(i);
  for (int i = 1, iE = n; i <= iE; i++)
    for (int t : tmp[i]) G[t].push_back(i);
  for (int i = n, iE = 1; i >= iE; i--) calc(i);
  for (int i = n, iE = 1; i >= iE; i--)
    Max(f1[i - 1], f1[i]), Max(f2[i - 1], f2[i]);
  for (int i = 1, iE = n; i <= iE; i++)
    if (i % 2)
      cout << f1[i / 2] << " ";
    else
      cout << f2[i / 2] << " ";
  cout << endl;
  return 0;
}