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 = 1e6 + 7;
vector<int> edg[MAXN];
int niche[MAXN];
map<int, int> mp[MAXN];
void dfs(int u, int p) {
  for (int v : edg[u]) {
    if (v == p) continue;
    dfs(v, u);
    niche[u] = max(niche[u], 1 + niche[v]);
    mp[u][niche[v] + 1]++;
  }
}
int ans[MAXN];
int up[MAXN];
void solve(int u, int p, int upore) {
  up[u] = upore;
  if (p > 0) {
    mp[u][upore + 1]++;
  }
  mp[u][0]++;
  int total = 0;
  for (pair<int, int> pr : mp[u]) total += pr.second;
  int last = -1;
  for (pair<int, int> pr : mp[u]) {
    if (pr.first > 0) {
      ans[pr.first * 2] = max(ans[pr.first * 2], total);
      ans[pr.first * 2 - 1] =
          max(ans[pr.first * 2 - 1], total + (last == pr.first - 1));
      ans[pr.first * 2 + 1] =
          max(ans[pr.first * 2 + 1], (total - pr.second) + 1);
    }
    last = pr.first;
    total -= pr.second;
  }
  for (int v : edg[u]) {
    if (v == p) continue;
    mp[u][niche[v] + 1]--;
    auto it = prev(mp[u].end());
    if (it->second == 0) it = prev(it);
    solve(v, u, it->first);
    mp[u][niche[v] + 1]++;
  }
}
void twoPointer(int u, int v) {
  int utotal = 0;
  for (pair<int, int> p : mp[u]) utotal += p.second;
  int vtotal = 0;
  for (pair<int, int> p : mp[v]) vtotal += p.second;
  for (auto ut = mp[u].begin(), vt = mp[v].begin();
       ut != mp[u].end() && vt != mp[v].end();) {
    if (ut->first < vt->first) {
      ans[ut->first * 2] = max(ans[ut->first * 2], utotal + vtotal);
      utotal -= ut->second;
      ut++;
    } else if (ut->first > vt->first) {
      ans[vt->first * 2] = max(ans[vt->first * 2], utotal + vtotal);
      vtotal -= vt->second;
      vt++;
    } else {
      ans[ut->first * 2] = max(ans[ut->first * 2], utotal + vtotal);
      utotal -= ut->second;
      ut++;
      vtotal -= vt->second;
      vt++;
    }
  }
}
void haha(int u, int p) {
  for (int v : edg[u]) {
    if (v == p) continue;
    mp[v][up[v] + 1]--;
    mp[u][niche[v] + 1]--;
    twoPointer(v, u);
    mp[u][niche[v] + 1]++;
    mp[v][up[v] + 1]++;
  }
  for (int v : edg[u]) {
    if (v == p) continue;
    haha(v, u);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    edg[u].push_back(v);
    edg[v].push_back(u);
  }
  ans[n] = 1;
  ans[n - 1] = 1;
  dfs(1, 0);
  solve(1, 0, 0);
  haha(1, 0);
  for (int i = n; i > 0; i--) {
    ans[i] = max(ans[i], ans[i + 2]);
  }
  for (int i = 1; i <= n; i++) {
    ans[1] = max(ans[1], 1 + (int)edg[i].size());
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}