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 c = 500005;
int n, ans[2 * c], leut[c];
vector<int> sz[c], t[c];
vector<pair<int, int> > csop[c];
bool v[c], v2[c];
void dfs(int a) {
  v[a] = true;
  for (int x : sz[a]) {
    if (!v[x]) {
      dfs(x);
      t[a].push_back(leut[x] + 1);
      leut[a] = max(leut[a], leut[x] + 1);
    }
  }
}
void dfs2(int a) {
  sort(t[a].begin(), t[a].end());
  for (int x : t[a]) {
    if (csop[a].size() == 0 || x != csop[a].back().first) {
      csop[a].push_back({x, 1});
    } else {
      csop[a].back().second++;
    }
  }
  int si = csop[a].size(), sum = 0;
  for (int i = si - 1; i >= 0; i--) {
    int fi = csop[a][i].first, se = csop[a][i].second;
    sum += se;
    ans[2 * fi - 1] = max(ans[2 * fi - 1], sum);
    ans[2 * fi] = max(ans[2 * fi], sum);
    if (i > 0) {
      int el = csop[a][i - 1].first;
      ans[2 * el + 1] = max(ans[2 * el + 1], sum + 1);
    }
  }
  int opt = csop[a].back().first, opt2 = 0;
  if (csop[a].back().second > 1) {
    opt2 = opt;
  } else {
    if (si > 1) {
      opt2 = csop[a][si - 2].first;
    }
  }
  v2[a] = true;
  for (int x : sz[a]) {
    if (!v2[x]) {
      if (leut[x] + 1 == opt) {
        t[x].push_back(opt2 + 1);
      } else {
        t[x].push_back(opt + 1);
      }
      dfs2(x);
      int p1 = csop[a].size(), p2 = csop[x].size();
      p1--, p2--;
      sum = -2;
      bool spec = (a == 1 && x == 4);
      while (p1 >= 0 || p2 >= 0) {
        if (p2 < 0 || (p1 >= 0 && csop[a][p1].first >= csop[x][p2].first)) {
          int s = csop[a][p1].first;
          sum += csop[a][p1].second;
          p1--;
          ans[2 * s] = max(ans[2 * s], sum);
        } else {
          int s = csop[x][p2].first;
          sum += csop[x][p2].second;
          p2--;
          ans[2 * s] = max(ans[2 * s], sum);
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    sz[a].push_back(b), sz[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    int s = sz[i].size();
    ans[1] = max(ans[1], s + 1);
  }
  dfs(1);
  dfs2(1);
  for (int i = n; i >= 1; i--) {
    ans[i] = max({1, ans[i], ans[i + 2]});
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}