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;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
const int N = 5e5 + 7;
vector<int> g[N];
int dp[N];
void dfs(int v, int pr) {
  dp[v] = 0;
  for (int to : g[v]) {
    if (to != pr) {
      dfs(to, v);
      dp[v] = max(dp[v], dp[to] + 1);
    }
  }
}
int ans[3 * N], bns[3 * N];
int diam = 0;
int fenw[N];
void inc(int x, int y) {
  for (; x >= 0; x = (x & (x + 1)) - 1) {
    fenw[x] += y;
  }
}
int get(int x) {
  int ret = 0;
  for (; x < N; x = (x | (x + 1))) {
    ret += fenw[x];
  }
  return ret;
}
void solve(int v, int pr, int up) {
  int a = 0, b = 0;
  vector<int> ret = {up, 0};
  for (int to : g[v]) {
    if (to != pr) {
      int x = dp[to] + 1;
      if (x > a) swap(x, a);
      if (x > b) swap(x, b);
      ret.push_back(dp[to] + 1);
    }
  }
  diam = max(diam, a + b);
  sort(ret.rbegin(), ret.rend());
  for (int i = 1; i < (int)ret.size(); i++) {
    int k = 2 * ret[i];
    if (ret[i - 1] > ret[i]) k++;
    ans[k] = max(ans[k], i + 1);
  }
  for (int to : g[v]) {
    if (to != pr) {
      int go = (a == dp[to] + 1 ? b : a);
      solve(to, v, max(up, go) + 1);
    }
  }
  for (int x : ret) {
    if (x) {
      inc(x, 1);
    }
  }
  auto ok = ret;
  vector<int> f(ret.size());
  for (int to : g[v]) {
    if (to != pr) {
      inc(dp[to] + 1, -1);
      vector<int> ret;
      for (int x : g[to]) {
        if (x != v) {
          ret.push_back(dp[x] + 1);
        }
      }
      sort(ret.rbegin(), ret.rend());
      for (int i = 0; i < (int)ret.size(); i++) {
        int l = 0, r = (int)ok.size();
        while (l < r - 1) {
          int m = (l + r) / 2;
          if (ok[m] <= ret[i]) {
            r = m;
          } else {
            l = m;
          }
        }
        if (r != ok.size()) {
          f[r] = max(f[r], i + 1);
        }
      }
      for (int i = 0; i < (int)ret.size(); i++) {
        int cnt = i + 1 + get(ret[i]);
        bns[2 * ret[i]] = max(bns[2 * ret[i]], cnt);
      }
      inc(dp[to] + 1, 1);
    }
  }
  for (int i = 1; i < (int)ret.size(); i++) {
    f[i] = max(f[i], f[i - 1]);
  }
  for (int i = 0; i < (int)ret.size(); i++) {
    bns[2 * ret[i]] = max(bns[2 * ret[i]], i + f[i]);
  }
  for (int x : ret) {
    if (x) {
      inc(x, -1);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int ts = 0;
  {
    int n;
    cin >> n;
    diam = 0;
    for (int i = 0; i < n; i++) g[i].clear();
    for (int i = 1; i <= n; i++) ans[i] = 0, bns[i] = 0;
    for (int i = 1; i < n; i++) {
      int a = rnd() % i, b = i;
      cin >> a >> b;
      a--, b--;
      g[a].push_back(b);
      g[b].push_back(a);
    }
    dfs(0, -1);
    solve(0, -1, 0);
    for (int i = n; i >= 1; i--) {
      if (i + 1 <= n) ans[i] = max(ans[i], ans[i + 1]);
      if (i + 2 <= n) bns[i] = max(bns[i], bns[i + 2]);
    }
    for (int i = 1; i <= n; i++) {
      ans[i] = max(ans[i], bns[i]);
      ans[i] = max(ans[i], 1 + (i <= diam));
    }
    for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
    cout << endl;
  }
}