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 MAXN = 5e5 + 5;
int N;
vector<int> adj[MAXN];
vector<pair<int, int> > ch[MAXN];
int mx1[MAXN], mx2[MAXN];
int up[MAXN];
int ans[MAXN];
void load() {
  scanf("%d", &N);
  for (int i = 1; i < N; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
}
int dfs_down(int x, int p) {
  for (auto it : adj[x])
    if (it != p) {
      int tmp = dfs_down(it, x) + 1;
      ch[x].push_back({it, tmp});
      if (tmp >= mx1[x]) {
        mx2[x] = mx1[x];
        mx1[x] = tmp;
      } else if (tmp > mx2[x])
        mx2[x] = tmp;
    }
  return mx1[x];
}
void dfs_up(int x) {
  for (auto it : ch[x]) {
    up[it.first] = max(up[x], it.second == mx1[x] ? mx2[x] : mx1[x]) + 1;
    dfs_up(it.first);
  }
}
inline void update(int x, int val) {
  if (x <= N && val > 1 && val > ans[x]) ans[x] = val;
}
void dfs_calc(int x, int above, const vector<pair<int, int> > &par) {
  map<int, int> tmp;
  tmp[0]++;
  tmp[up[x]]++;
  for (auto it : ch[x]) tmp[it.second]++;
  vector<pair<int, int> > imp;
  for (auto it = tmp.rbegin(); it != tmp.rend(); it++) imp.push_back(*it);
  int geq = 0;
  for (auto it : imp) {
    geq += it.second;
    update(2 * it.first, geq);
    update(2 * it.first - 1, geq);
    update(2 * it.first + 1, geq - it.second + 1);
  }
  for (auto it : ch[x]) dfs_calc(it.first, it.second, imp);
  vector<pair<int, int> > nxt(imp.size() + par.size());
  merge(imp.begin(), imp.end(), par.begin(), par.end(), nxt.begin(),
        greater<pair<int, int> >());
  imp.clear();
  for (int i = 0; i < nxt.size(); i++)
    if (i < (int)nxt.size() - 1 && nxt[i].first == nxt[i + 1].first) {
      imp.push_back({nxt[i].first, nxt[i].second + nxt[i + 1].second});
      i++;
    } else
      imp.push_back(nxt[i]);
  geq = 0;
  for (auto it : imp) {
    geq += it.second;
    update(2 * it.first, geq - (above >= it.first) - (up[x] >= it.first));
  }
}
void solve() {
  dfs_down(1, 0);
  dfs_up(1);
  dfs_calc(1, 0, {});
  for (int i = N; i; i--) ans[i] = max(ans[i], ans[i + 2]);
  for (int i = 1; i <= N; i++) printf("%d ", max(ans[i], 1));
  puts("");
}
int main() {
  load();
  solve();
  return 0;
}