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;
inline void chkmax(int& a, int b) {
  if (a < b) a = b;
}
const int N = (int)5e5 + 5;
vector<int> g[N];
map<int, int> to[N];
vector<pair<int, int> > zip[N];
int dfs(int v, int p) {
  int res = 0;
  for (int u : g[v]) {
    if (u == p) continue;
    to[v][u] = dfs(u, v) + 1;
    res = max(res, to[v][u]);
  }
  return res;
}
void dfsReRoot(int v, int p) {
  set<pair<int, int> > S;
  for (auto [u, h] : to[v]) S.insert({h, u});
  for (int u : g[v]) {
    if (u == p) continue;
    S.erase({to[v][u], u});
    to[u][v] = (S.empty() ? 0 : (--S.end())->first) + 1;
    dfsReRoot(u, v);
    S.insert({to[v][u], u});
  }
}
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int> > edges;
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    --u;
    --v;
    edges.push_back({u, v});
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(0, -1);
  dfsReRoot(0, -1);
  vector<int> ans(2 * n + 1, 1);
  for (int v = 0; v < n; ++v) {
    map<int, int> cnt;
    for (auto& [u, h] : to[v]) ++cnt[h];
    chkmax(ans[1], (int)(g[v]).size() + 1);
    int sum = (int)(g[v]).size();
    for (auto& [h, x] : cnt) {
      zip[v].push_back({h, x});
      if (sum > 1) chkmax(ans[2 * h], sum);
      sum -= x;
      if (sum > 0) chkmax(ans[2 * h + 1], sum + 1);
    }
  }
  for (int h = n; h > 0; --h) chkmax(ans[h - 1], ans[h]);
  auto update = [&](int v, int h, int delta) {
    for (auto& [hh, x] : zip[v]) {
      if (hh == h) {
        x += delta;
        return;
      }
    }
  };
  for (auto [u, v] : edges) {
    update(v, to[v][u], -1);
    update(u, to[u][v], -1);
    static vector<pair<int, int> > united;
    united.clear();
    merge((zip[v]).begin(), (zip[v]).end(), (zip[u]).begin(), (zip[u]).end(),
          back_inserter(united));
    int sum = (int)(g[u]).size() + (int)(g[v]).size() - 2;
    for (auto [h, x] : united) {
      chkmax(ans[2 * h], sum);
      sum -= x;
    }
    update(v, to[v][u], +1);
    update(u, to[u][v], +1);
  }
  for (int h = n; h - 2 > 0; --h) chkmax(ans[h - 2], ans[h]);
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
}