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 = 1e6 + 10;
const int inf = 1e9;
int gi() {
  int x = 0, o = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') o = -1, ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * o;
}
bool chkmax(int &a, int b) { return a < b ? a = b, 1 : 0; }
struct dat {
  int mx1, mx2;
  void insert(int v) {
    if (mx1 < v)
      mx2 = mx1, mx1 = v;
    else
      mx2 = max(mx2, v);
  }
} p[N];
int n, fa[N], f[N], g[N], ans[N];
vector<int> E[N];
vector<pair<int, int> > vec[N];
void dfs1(int u, int ff) {
  fa[u] = ff;
  p[u] = (dat){0, -inf};
  for (auto v : E[u])
    if (v ^ ff) dfs1(v, u), p[u].insert(f[v] + 1);
  f[u] = p[u].mx1;
}
void dfs2(int u) {
  for (auto v : E[u])
    if (v ^ fa[u])
      g[v] = max(p[u].mx1 == f[v] + 1 ? p[u].mx2 : p[u].mx1, g[u] + 1), dfs2(v);
}
int main() {
  cin >> n;
  for (int i = 1, u, v; i < n; i++)
    u = gi(), v = gi(), E[u].push_back(v), E[v].push_back(u);
  dfs1(1, 0);
  g[1] = -inf;
  dfs2(1);
  for (int i = 1; i <= n; i++) ans[i] = 1;
  for (int i = 1; i <= n; i++) {
    map<int, int> cnt;
    for (auto j : E[i])
      if (j == fa[i])
        ++cnt[g[i] + 1];
      else
        ++cnt[f[j] + 1];
    for (auto x : cnt) vec[i].push_back(x);
    reverse(vec[i].begin(), vec[i].end());
    int sum = 0;
    for (auto x : vec[i])
      chkmax(ans[2 * x.first + 1], sum + 1), sum += x.second,
          chkmax(ans[2 * x.first], sum), chkmax(ans[2 * x.first - 1], sum);
  }
  for (int i = 2; i <= n; i++) {
    int p = 0, q = 0, sum = 0;
    auto &A = vec[i], &B = vec[fa[i]];
    while (p < int(A.size()) || q < int(B.size())) {
      if (p < int(A.size()) && (q == int(B.size()) || A[p].first > B[q].first))
        sum += A[p].second, chkmax(ans[2 * A[p].first], sum - 2), ++p;
      else
        sum += B[q].second, chkmax(ans[2 * B[q].first], sum - 2), ++q;
    }
  }
  for (int i = n - 2; i > 1; i--) chkmax(ans[i], ans[i + 2]);
  ans[1] = 0;
  for (int i = 1; i <= n; i++) chkmax(ans[1], int(E[i].size()) + 1);
  for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
  return 0;
}