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>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
template <class T>
void cxk(T& a, T b) {
  a = a > b ? a : b;
}
template <class T>
void cnk(T& a, T b) {
  a = a < b ? a : b;
}
int fir[500010], nxt[1000010], dis[1000010], id;
std::vector<int> G[500010];
void link(int a, int b) {
  nxt[++id] = fir[a], fir[a] = id, dis[id] = b, G[a].push_back(b);
}
int ans[500010], FA[500010];
int f[500010], cf[500010], g[500010];
void dfs(int x, int fa = -1) {
  for (int i = fir[x]; i; i = nxt[i]) {
    if (fa == dis[i]) continue;
    FA[dis[i]] = x;
    dfs(dis[i], x);
    if (f[dis[i]] + 1 > f[x])
      cf[x] = f[x], f[x] = f[dis[i]] + 1;
    else
      cf[x] = std::max(cf[x], f[dis[i]] + 1);
  }
}
void dfs2(int x, int fa = -1) {
  for (int i = fir[x]; i; i = nxt[i]) {
    if (fa == dis[i]) continue;
    g[dis[i]] = std::max(g[x], f[x] == f[dis[i]] + 1 ? cf[x] : f[x]) + 1;
    dfs2(dis[i], x);
  }
}
std::map<int, int> M;
std::vector<std::pair<int, int>> V[500010];
int main() {
  int n = gi(), u, v;
  for (int i = 1; i < n; ++i) u = gi(), v = gi(), link(u, v), link(v, u);
  dfs(1);
  dfs2(1);
  for (int i = 1; i <= n; ++i) {
    M.clear();
    for (int j : G[i]) ++M[f[j] > f[i] ? g[i] : f[j] + 1];
    for (auto [x, y] : M) V[i].push_back({x, y});
    std::reverse(V[i].begin(), V[i].end());
    int sum = 0;
    for (auto [x, y] : V[i])
      cxk(ans[x * 2 + 1], sum + 1), sum += y, cxk(ans[x * 2], sum),
          cxk(ans[x * 2 - 1], sum);
  }
  for (int i = 2; i <= n; ++i) {
    int p = 0, q = 0, sum = -2;
    while (p < V[i].size() || q < V[FA[i]].size()) {
      if (p < V[i].size() && (q == V[FA[i]].size() || V[i][p] > V[FA[i]][q]))
        sum += V[i][p].second, cxk(ans[V[i][p].first * 2], sum), ++p;
      else
        sum += V[FA[i]][q].second, cxk(ans[V[FA[i]][q].first * 2], sum), ++q;
    }
  }
  ans[n] = 1;
  cxk(ans[n - 1], 1);
  for (int i = n - 2; i; --i) cxk(ans[i], ans[i + 2]);
  for (int i = 1; i <= n; ++i) cxk(ans[1], (int)G[i].size() + 1);
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}