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;
struct edge {
  int v, nxt;
} e[2000005];
struct pt {
  int val, id;
  pt(int val = 0, int id = 0) : val(val), id(id) {}
  bool operator<(const pt x) const { return id > x.id; }
} b[500005];
int n, h[500005], t = 1, tans[500005], d[500005], tmp[500005], dg[500005];
int bt;
vector<int> a[500005];
multiset<int> st;
map<int, int> mp[500005];
void add(int u, int v) {
  e[++t].v = v;
  e[t].nxt = h[u];
  h[u] = t;
}
void dfs(int u, int fa) {
  d[u] = 0;
  for (int i = h[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == fa) continue;
    dfs(v, u);
    a[u].push_back(d[v] + 1);
    d[u] = max(d[u], d[v] + 1);
  }
}
void dfs2(int u, int fa, int dep) {
  if (dep) a[u].push_back(dep);
  st.clear();
  st.insert(dep + 1);
  for (int i = h[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == fa) continue;
    st.insert(d[v] + 2);
  }
  for (int i = h[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == fa) continue;
    st.erase(st.lower_bound(d[v] + 2));
    tmp[v] = *--st.end();
    st.insert(d[v] + 2);
  }
  for (int i = h[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == fa) continue;
    dfs2(v, u, tmp[v]);
  }
}
bool cmp(const int x, const int y) { return x > y; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
    dg[u]++, dg[v]++;
  }
  for (int i = 1; i <= n; i++) tans[i] = 1;
  for (int i = 1; i <= n; i++)
    if (dg[i] + 1 > tans[1]) tans[1] = dg[i] + 1;
  dfs(1, 0);
  dfs2(1, 0, 0);
  for (int i = 1; i <= n; i++) {
    int u = i;
    sort(a[u].begin(), a[u].end(), cmp);
    int nw = 0, val = 1e9, ct = 0;
    for (int j = 0; j < (int)a[u].size(); j++) {
      int x = a[u][j];
      if (x) mp[u][x]++;
      if (val > x)
        nw += ct, val = x, ct = 1;
      else
        ct++;
      if (x) tans[2 * x + 1] = max(tans[2 * x + 1], nw + 1);
      if (x > 1) tans[2 * x - 1] = max(tans[2 * x - 1], nw + ct);
      if (x) tans[2 * x] = max(tans[2 * x], nw + ct);
    }
  }
  for (int i = 2; i <= t; i += 2) {
    int u = e[i].v, v = e[i ^ 1].v;
    bt = 0;
    for (map<int, int>::iterator it = mp[u].begin(); it != mp[u].end(); it++) {
      b[++bt].id = it->first;
      b[bt].val = it->second;
    }
    for (map<int, int>::iterator it = mp[v].begin(); it != mp[v].end(); it++) {
      b[++bt].id = it->first;
      b[bt].val = it->second;
    }
    sort(b + 1, b + bt + 1);
    int pre = 0;
    for (int j = 1; j <= bt; j++) {
      pre += b[j].val;
      tans[b[j].id * 2] = max(tans[b[j].id * 2], pre - 2);
    }
  }
  for (int i = n - n % 2; i; i -= 2) tans[i] = max(tans[i], tans[i + 2]);
  for (int i = n - ((n % 2) ^ 1); i > 1; i -= 2)
    tans[i] = max(tans[i], tans[i + 2]);
  for (int i = 1; i <= n; i++) printf("%d ", tans[i]);
  return 0;
}