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;
double PI = 3.141592653589793238462643383279;
const double EPS = 1e-9;
const long long MOD = 1000000007;
const int inf = 1 << 30;
const long long linf = 1LL << 60;
int n;
vector<vector<int>> e;
vector<int> par, dep;
vector<vector<pair<int, int>>> deps;
vector<vector<int>> hoge;
vector<int> val;
vector<int> ans;
vector<int> ch;
void dfs(int v, int p) {
  dep[v] = 0;
  for (int i = 0; i < (int)e[v].size(); i++) {
    if (e[v][i] == p) continue;
    par[e[v][i]] = v;
    dfs(e[v][i], v);
    dep[v] = max(dep[v], dep[e[v][i]] + 1);
    deps[v].push_back(pair<int, int>(dep[e[v][i]] + 1, e[v][i]));
  }
}
void dfs2(int v) {
  if (v) {
    int p = par[v];
    if (deps[p][0].second == v) {
      if (deps[p].size() == 1)
        deps[v].push_back(pair<int, int>(1, p));
      else
        deps[v].push_back(pair<int, int>(deps[p][1].first + 1, p));
    } else {
      deps[v].push_back(pair<int, int>(deps[p][0].first + 1, p));
    }
    sort(deps[v].begin(), deps[v].end(), greater<pair<int, int>>());
  }
  for (int i = 0; i < (int)e[v].size(); i++) {
    if (e[v][i] == par[v]) continue;
    dfs2(e[v][i]);
  }
}
int main() {
  scanf("%d", &n);
  e.resize(n);
  par.resize(n);
  dep.resize(n);
  deps.resize(n);
  hoge.resize(n);
  val.resize(n);
  ans.resize(2 * n + 1);
  ch.resize(n);
  for (int i = 0; i < (int)n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--;
    v--;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  dfs(0, 0);
  for (int i = 0; i < (int)n; i++)
    sort(deps[i].begin(), deps[i].end(), greater<pair<int, int>>());
  dfs2(0);
  for (int i = 0; i < (int)n; i++) {
    for (int j = 0; j < (int)deps[i].size(); j++) {
      pair<int, int> p = deps[i][j];
      hoge[p.first].push_back(i);
    }
  }
  for (int i = n - 1; i >= 1; i--) {
    for (int h : hoge[i]) {
      ans[2 * i + 1] = max(ans[2 * i + 1], val[h] + 1);
    }
    for (int h : hoge[i]) {
      val[h]++;
      ans[2 * i - 1] = max(ans[2 * i - 1], val[h]);
      ans[2 * i] = max(ans[2 * i], val[h]);
      ans[2 * i] = max(ans[2 * i], val[h] + ch[h] - 2);
      if (h) {
        ch[par[h]] = max(ch[par[h]], val[h]);
        ans[2 * i] = max(ans[2 * i], val[h] + val[par[h]] - 2);
      }
    }
  }
  for (int i = n - 2; i >= 1; i--) ans[i] = max(ans[i], ans[i + 2]);
  ans[1]++;
  for (int i = 1; i <= n; i++) {
    printf("%d ", max(ans[i], 1));
  }
  puts("");
}