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;
template <typename T>
void maxtt(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T& t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
string direc = "URDL";
const long long MOD2 = (long long)998244353 * (long long)998244353;
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int& x, int y, int mod = 998244353) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 998244353) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
vector<int> mp[500135], V[500135];
int ans[500135], fa[500135], dp[500135];
void dfs(int x, int pa) {
  fa[x] = pa;
  dp[x] = 1;
  for (int c : mp[x])
    if (c != pa) {
      dfs(c, x);
      maxtt(dp[x], dp[c] + 1);
    }
}
void dfs2(int x, int pa, int mxD) {
  V[mxD].push_back(x);
  int m1 = mxD, m2 = mxD;
  for (int c : mp[x])
    if (c != pa) {
      V[dp[c]].push_back(x);
      if (dp[c] > m1) {
        m2 = m1;
        m1 = dp[c];
      } else if (dp[c] > m2)
        m2 = dp[c];
    }
  for (int c : mp[x])
    if (c != pa) {
      if (dp[c] == m1)
        dfs2(c, x, m2 + 1);
      else
        dfs2(c, x, m1 + 1);
    }
}
int cc[500135], lt[500135], ms[500135];
void up(int len, int cc) {
  if (len > 1) maxtt(ans[len], cc);
}
void fmain(int tid) {
  scanf("%d", &n);
  for (int i = 0, u, v; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    mp[u].push_back(v);
    mp[v].push_back(u);
  };
  for (int(i) = 1; (i) <= (int)(n); (i)++) ans[i] = 1;
  for (int(i) = 1; (i) <= (int)(n); (i)++) maxtt(ans[1], (int)mp[i].size() + 1);
  dfs(1, 0);
  dfs2(1, 0, 0);
  for (int i = n; i >= 1; i--)
    for (auto v : V[i]) {
      ++cc[v];
      up(2 * min(i, lt[v] - 1) + 1, cc[v]);
      lt[v] = i;
      up(2 * i, cc[v]);
      up(2 * i, cc[v] + max(ms[v], cc[fa[v]]) - 2);
      maxtt(ms[fa[v]], cc[v]);
    }
  for (int i = n - 2; i >= 2; i--) maxtt(ans[i], ans[i + 2]);
  for (int(i) = 1; (i) <= (int)(n); (i)++) printf("%d ", ans[i]);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}