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 long long MOD = (long long)1e9 + 7;
const long double PI = 3.141592653589793238462643383279502884197;
long long fac[1], inv[1];
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long mp(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return ret;
}
long long cmb(long long r, long long c) {
  return fac[r] * inv[c] % MOD * inv[r - c] % MOD;
}
priority_queue<int, vector<int>, greater<int>> pq;
vector<int> v[500001];
int n;
int dist[500001];
int p[500001], cc[500001];
int up[500001];
int ans[1000005], mm[500001];
vector<int> adj[500001], g[500001];
int pre(int o, int pa) {
  p[o] = pa;
  int me = 0;
  for (int i : v[o]) {
    if (i != pa) {
      me = max(me, pre(i, o) + 1);
    }
  }
  return dist[o] = me;
}
void go(int o, int pa) {
  int m1 = up[o], m2 = 0, c = pa;
  for (int i : v[o]) {
    if (i != pa) {
      if (m1 < dist[i] + 1) {
        m2 = m1;
        m1 = dist[i] + 1;
        c = i;
      } else if (m2 < dist[i] + 1)
        m2 = dist[i] + 1;
    }
  }
  if (up[o]) adj[o].push_back(up[o]);
  for (int i : v[o]) {
    if (i != pa) {
      adj[o].push_back(dist[i] + 1);
      if (c == i)
        up[i] = m2 + 1;
      else
        up[i] = m1 + 1;
      go(i, o);
    }
  }
}
int main() {
  scanf("%d", &n);
  fill(ans + 1, ans + n + 1, 1);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--;
    b--;
    v[a].push_back(b);
    v[b].push_back(a);
    ans[1] = max(ans[1], (int)(v[a]).size() + 1);
    ans[1] = max(ans[1], (int)(v[b]).size() + 1);
  }
  pre(0, 0);
  go(0, 0);
  for (int i = 0; i < n; i++) {
    sort((adj[i]).begin(), (adj[i]).end(), greater<int>());
    for (int j = 0; j < (int)(adj[i]).size(); j++) {
      int d = adj[i][j];
      if (j) {
        ans[d * 2] = max(ans[d * 2], j + 1);
        ans[d * 2 - 1] = max(ans[d * 2 - 1], j + 1);
        if (d < adj[i][j - 1]) ans[d * 2 + 1] = max(ans[d * 2 + 1], j + 1);
      }
      g[d].push_back(i);
    }
  }
  memset(mm, -0x3f, sizeof(mm));
  memset(cc, -1, sizeof(cc));
  for (int i = 0; i < n; i++)
    if ((int)(v[i]).size() >= 2 || i == 0) mm[i] = -1;
  for (int i = n; i >= 1; i--) {
    for (int j : g[i]) {
      cc[j]++;
      ans[i * 2] = max(ans[i * 2], cc[j] + mm[j]);
      if (p[j] != j) {
        mm[p[j]] = max(mm[p[j]], cc[j]);
        ans[i * 2] = max(ans[i * 2], cc[p[j]] + mm[p[j]]);
      }
    }
  }
  for (int i = n - 2; i >= 1; i--) ans[i] = max(ans[i], ans[i + 2]);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
}