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;
using vi = vector<int>;
using pii = pair<int, int>;
using vii = vector<pii>;
using ll = long long;
int solve();
int main(int argc, char* argv[]) {
  ::std::ios::sync_with_stdio(false);
  ::std::cin.tie(0);
  ::std::cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
constexpr int N = 500005;
int n, u, v, h[N], g[N], parent[N], ans[N * 2], val[N];
int mx = 0, ed = 0, child[N];
bool check[N];
pii f[N][2];
vi adj[N], eve[N];
void dfs(int u, int p) {
  h[u] = h[p] + 1;
  parent[u] = p;
  f[u][0] = make_pair(0, u);
  f[u][1] = make_pair(-1, 0);
  for (int v : adj[u]) {
    if (v != p) {
      dfs(v, u);
      auto temp = f[v][0];
      temp.first++;
      temp.second = v;
      for (int i = 0; i < 2; ++i) {
        if (temp > f[u][i]) {
          swap(temp, f[u][i]);
        }
      }
    }
  }
}
void dfs_v2(int u, int p) {
  eve[0].push_back(u);
  if (p != 0) {
    g[u] = max(g[p], f[p][0].second == u ? f[p][1].first : f[p][0].first) + 1;
    eve[g[u]].push_back(u);
  }
  for (int v : adj[u]) {
    if (v != p) {
      eve[f[v][0].first + 1].push_back(u);
      dfs_v2(v, u);
    }
  }
}
int solve() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1, 0);
  dfs_v2(1, 0);
  for (int i = n; i >= 0; i--) {
    int ev = i * 2, od = i * 2 + 1;
    ans[od] = mx;
    for (int v : eve[i]) {
      if (!check[v]) {
        check[v] = true;
        ans[od] = ::std::max(ans[od], val[v] + 1);
      }
    }
    for (int v : eve[i]) {
      check[v] = false;
      mx = max(mx, ++val[v]);
      ed = std::max(ed, val[v] + child[v] - 2);
      if (v != 1) {
        const int pv = parent[v];
        child[pv] = max(child[pv], val[v]);
        ed = std::max(ed, val[pv] + child[pv] - 2);
      }
    }
    ans[ev] = max(mx, ed);
  }
  for (int i = 1; i <= n; i++) {
    cout << ::std::max(ans[i], 1) << " ";
  }
  return 0;
}