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;
class DecCou {
 private:
  vector<int> cou;

 public:
  void init(int v) {
    if (v < 0) return;
    if (v >= cou.size()) cou.resize(v + 1, 0);
    ++cou[v];
  }
  void dec(int v) {
    if (v >= 0) --cou[v];
    if (v > 0) ++cou[v - 1];
    if (!cou.empty() && cou.back() == 0) cou.pop_back();
  }
  int max() const { return (int)cou.size() - 1; }
};
const int N = 5 * (int)1e5;
vector<int> conns[N];
DecCou act[N];
DecCou even_cou;
DecCou odd_cou;
DecCou both_cou;
int par[N];
int dp[N];
bool odd_add[N];
void dfs(int i, int p) {
  par[i] = p;
  for (auto t : conns[i]) {
    if (t != p) dfs(t, i);
  }
}
int off(int i) { return dp[i] + act[i].max() - 2; }
void oddFlag(int i, vector<int>& odd_que) {
  if (!odd_add[i]) {
    odd_add[i] = true;
    odd_que.push_back(i);
  } else {
    odd_cou.dec(dp[i] + 1);
  }
}
void decDP(int i, vector<int>& nxt_que, vector<int>& odd_que) {
  if (par[i] != -1) {
    int p = par[i];
    int v = dp[p] + act[p].max() - 2;
    act[p].dec(dp[i]);
    if (off(p) < v) even_cou.dec(v);
  }
  int v = dp[i] + act[i].max() - 2;
  even_cou.dec(v);
  oddFlag(i, odd_que);
  both_cou.dec(dp[i]);
  dp[i] -= 1;
  if (dp[i] == 1) {
    for (auto t : conns[i]) nxt_que.push_back(t);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    conns[a].push_back(b);
    conns[b].push_back(a);
  }
  dfs(0, -1);
  vector<int> ans(n, 1);
  vector<int> dp_que, odd_que;
  for (int i = 0; i < n; ++i) {
    dp[i] = conns[i].size();
    if (par[i] != -1) {
      act[par[i]].init(dp[i]);
    }
    both_cou.init(dp[i]);
    odd_cou.init(dp[i] + 1);
    oddFlag(i, odd_que);
    if (dp[i] == 1) {
      for (auto t : conns[i]) dp_que.push_back(t);
    }
  }
  for (int i = 0; i < n; ++i) {
    even_cou.init(dp[i] + act[i].max() - 2);
  }
  for (int k = 1; 2 * k - 1 <= n; ++k) {
    int off1 = max(1, both_cou.max());
    int off2 = even_cou.max();
    int off3 = odd_cou.max();
    if (2 * k <= n) ans[2 * k - 1] = max(off1, off2);
    if (2 * k - 1 <= n) ans[2 * k - 2] = max(off1, off3);
    for (auto i : odd_que) {
      odd_add[i] = false;
      odd_cou.dec(dp[i] + 1);
    }
    odd_que.clear();
    vector<int> nxt_que;
    for (auto i : dp_que) decDP(i, nxt_que, odd_que);
    dp_que = nxt_que;
  }
  for (auto v : ans) cout << v << ' ';
  cout << '\n';
}