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 N = 5e5 + 10;
int dist[N];
int ans[N];
int ans_par[N];
int soma_freq[N];
vector<pair<int, int>> vf[N];
vector<int> g[N];
map<int, int> mp[N];
namespace ds {
void dfs(int no, int from) {
  int &ans = dist[no];
  ans = 0;
  for (auto &it : g[no]) {
    if (it == from) continue;
    dfs(it, no);
    ans = max(ans, dist[it] + 1);
  }
}
};  // namespace ds
namespace comp {
void dfs(int no, int from, int d_pai) {
  multiset<int> s;
  if (from != -1) {
    s.insert(d_pai);
    mp[no][from] = d_pai;
  }
  for (auto &it : g[no]) {
    if (it != from) {
      mp[no][it] = dist[it] + 1;
      s.insert(dist[it] + 1);
    }
  }
  for (auto &it : g[no]) {
    if (it == from) continue;
    s.erase(s.find(dist[it] + 1));
    if (s.empty())
      dfs(it, no, 1);
    else {
      dfs(it, no, *(--s.end()) + 1);
    }
    s.insert(dist[it] + 1);
  }
};
};  // namespace comp
vector<pair<int, int>> edges;
int main() {
  int n;
  cin >> n;
  for (int nn = 0; nn < n - 1; nn++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--, v--;
    g[u].emplace_back(v);
    g[v].emplace_back(u);
    edges.emplace_back(u, v);
  }
  ds::dfs(0, -1);
  comp::dfs(0, -1, -1);
  for (int no = 0; no < n; no++) {
    vector<int> v;
    for (auto &par : mp[no]) v.emplace_back(par.second);
    sort((v).begin(), (v).end());
    for (int i = 0; i < v.size(); i++) {
      ans[2 * v[i]] = max<int>(ans[2 * v[i]], v.size() - i);
      if (i and v[i - 1] < v[i])
        ans[2 * v[i - 1] + 1] =
            max<int>(ans[2 * v[i - 1] + 1], v.size() - i + 1);
    }
  }
  for (int no = 0; no < n; no++) {
    map<int, int> mf;
    for (auto &par : mp[no]) {
      mf[par.second]++;
    }
    for (auto &par : mf) {
      vf[no].emplace_back(par);
      soma_freq[no] += par.second;
    }
  }
  for (auto &e : edges) {
    int u1, u2;
    tie(u1, u2) = e;
    int i1 = 0, i2 = 0;
    int somaf = soma_freq[u1] + soma_freq[u2];
    while (i1 < vf[u1].size() and i2 < vf[u2].size()) {
      if (vf[u1][i1].first < vf[u2][i2].first) {
        ans_par[2 * vf[u1][i1].first] =
            max(ans_par[2 * vf[u1][i1].first], somaf - 2);
        somaf -= vf[u1][i1].second;
        i1++;
      } else {
        ans_par[2 * vf[u2][i2].first] =
            max(ans_par[2 * vf[u2][i2].first], somaf - 2);
        somaf -= vf[u2][i2].second;
        i2++;
      }
    }
  }
  for (int i = n / 2 * 2; i >= 2; i -= 2)
    ans_par[i] = max<int>(ans_par[i], ans_par[i + 2]);
  for (int i = n; i >= 2; i--) ans[i] = max(ans[i], ans[i + 1]);
  int ans1 = 0;
  for (int i = 0; i < n; i++) ans1 = max(ans1, (int)g[i].size() + 1);
  printf("%d ", ans1);
  for (int i = 2; i <= n; i++)
    printf("%d%c", max<int>({1, ans_par[i], ans[i]}), " \n"[i == n]);
}