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 + 79;
class maxi_decrease {
 public:
  vector<int> v;
  void insert(int val) {
    if (val < 0) return;
    if (v.size() <= val) v.resize(val + 1, 0);
    v[val]++;
  }
  void decrease(int val) {
    if (val < 0) return;
    v[val]--;
    if (val > 0) v[val - 1]++;
    if (v.back() == 0) v.pop_back();
  }
  int get_max() { return v.size() - 1; }
};
vector<vector<int> > g(maxn);
vector<int> dp(maxn, 0), p(maxn, -1), que_dec, que_odd, que_nxt, extra(maxn, 0);
maxi_decrease odd, even, alldp;
vector<maxi_decrease> my(maxn);
void dfs(int v) {
  for (int i : g[v]) {
    if (p[v] == i) continue;
    p[i] = v;
    dfs(i);
  }
}
void decrease_extra(int v) {
  if (extra[v])
    odd.decrease(dp[v] + 1);
  else {
    extra[v] = true;
    que_odd.push_back(v);
  }
}
void decrease_dp_val(int v) {
  if (p[v] != -1) {
    int cur_val = my[p[v]].get_max() + dp[p[v]] - 2;
    my[p[v]].decrease(dp[v]);
    if (cur_val > my[p[v]].get_max() + dp[p[v]] - 2) even.decrease(cur_val);
  }
  decrease_extra(v);
  alldp.decrease(dp[v]);
  even.decrease(dp[v] + my[v].get_max() - 2);
  dp[v]--;
  if (dp[v] == 1)
    for (int i : g[v]) que_nxt.push_back(i);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0, u, v; i < n - 1; i++) {
    cin >> u >> v;
    g[--u].push_back(--v);
    g[v].push_back(u);
  }
  dfs(0);
  for (int i = 0; i < n; i++) {
    dp[i] = g[i].size();
    if (p[i] != -1) my[p[i]].insert(dp[i]);
    if (dp[i] == 1)
      for (int j : g[i]) que_dec.push_back(j);
    odd.insert(dp[i] + 1);
    alldp.insert(dp[i]);
    decrease_extra(i);
  }
  for (int i = 0; i < n; i++) even.insert(dp[i] + my[i].get_max() - 2);
  vector<int> ans(n + 2, 1);
  for (int i = 0; i * 2 + 1 <= n; i++) {
    ans[i * 2 + 1] = max({1, odd.get_max(), alldp.get_max()});
    ans[i * 2 + 2] = max({1, even.get_max(), alldp.get_max()});
    que_nxt.clear();
    for (int v : que_odd) {
      extra[v] = false;
      odd.decrease(dp[v] + 1);
    }
    que_odd.clear();
    for (int v : que_dec) decrease_dp_val(v);
    que_dec = que_nxt;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}