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 inf = (int)2e9;
const long long mod = 1000000007;
int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, 1, -1};
long long powmod(long long a, long long p) {
  long long ans = 1;
  a %= mod;
  while (p) {
    if (p & 1) ans *= a;
    p /= 2;
    a *= a;
    ans %= mod;
    a %= mod;
  }
  return ans;
}
long long mdinv(long long a) { return powmod(a, mod - 2); }
const int N = 5e5 + 10;
vector<int> adj[N];
vector<int> pre[N];
vector<int> suf[N];
int d[N];
vector<pair<int, int> > nb[N];
int f[2 * N];
void dfs1(int i, int p) {
  d[i] = 0;
  for (int v : adj[i]) {
    if (v != p) {
      dfs1(v, i), d[i] = max(d[i], 1 + d[v]);
    }
  }
}
void evaluate(vector<pair<int, int> >& v);
void go(vector<pair<int, int> >& v, vector<pair<int, int> >& v2);
void dfs2(int i, int p, int parDep) {
  vector<int>& pr = pre[i];
  for (int v : adj[i]) {
    if (v != p) {
      pr.push_back(d[v] + 1);
    } else
      pr.push_back(parDep + 1);
  }
  vector<int> lst(pr);
  vector<int>& sf = suf[i];
  sf = pr;
  for (int i = 1; i < (int)(pr.size()); i++) pr[i] = max(pr[i - 1], pr[i]);
  for (int i = (int)(pr.size()) - 2; i >= 0; i--) sf[i] = max(sf[i], sf[i + 1]);
  for (int first = 0; first < (int)(adj[i].size()); first++) {
    int v = adj[i][first];
    if (v == p) continue;
    int mx = 0;
    if (first) mx = max(mx, pr[first - 1]);
    if (first + 1 < (int)(pr.size())) mx = max(mx, sf[first + 1]);
    dfs2(v, i, mx);
  }
  for (int first : lst) nb[i].push_back({first, 1});
  vector<pair<int, int> >& v = nb[i];
  sort((v).begin(), (v).end());
  int ind = 0;
  for (int i = 1; i < (int)(v.size()); i++) {
    if (v[ind].first == v[i].first) {
      v[ind].second += v[i].second;
    } else {
      ind++;
      v[ind] = v[i];
    }
  }
  v.resize(ind + 1);
  evaluate(nb[i]);
  for (int v : adj[i]) {
    if (v != p) {
      go(nb[i], nb[v]);
    }
  }
}
vector<pair<int, int> > tmp;
void evaluate(vector<pair<int, int> >& v) {
  tmp = v;
  for (int i = (int)(tmp.size()) - 1; i >= 0; i--) {
    if (i != (int)(tmp.size()) - 1)
      tmp[i].second = tmp[i].second + tmp[i + 1].second;
    int dep = tmp[i].first;
    f[2 * dep] = max(f[2 * dep], tmp[i].second);
    int greater = tmp[i].second - v[i].second;
    f[2 * dep + 1] = max(f[2 * dep + 1], greater + 1);
    f[2 * dep - 1] = max(f[2 * dep - 1], tmp[i].second);
  }
}
void go(vector<pair<int, int> >& v1, vector<pair<int, int> >& v2) {
  tmp.clear();
  for (auto i : v1) tmp.push_back(i);
  for (auto i : v2) tmp.push_back(i);
  sort((tmp).begin(), (tmp).end());
  int ind = 0;
  for (int i = 1; i < (int)(tmp.size()); i++) {
    if (tmp[ind].first == tmp[i].first) {
      tmp[ind].second += tmp[i].second;
    } else {
      ind++;
      tmp[ind] = tmp[i];
    }
  }
  tmp.resize(ind + 1);
  for (int i = (int)(tmp.size()) - 1; i >= 0; i--) {
    if (i != (int)(tmp.size()) - 1)
      tmp[i].second = tmp[i].second + tmp[i + 1].second;
    int dep = tmp[i].first;
    f[2 * dep] = max(f[2 * dep], tmp[i].second - 2);
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < (int)2 * N; i++) f[i] = 1;
  int n;
  cin >> n;
  int a, b;
  int mxd = 0;
  for (int i = 0; i < (int)n - 1; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) mxd = max(mxd, (int)(adj[i].size()));
  dfs1(1, 0);
  dfs2(1, 0, -1);
  for (int i = N - 3; i >= 0; i -= 2) f[i] = max(f[i], f[i + 2]);
  for (int i = N - 4; i >= 0; i -= 2) f[i] = max(f[i], f[i + 2]);
  f[1] = mxd + 1;
  for (int i = 1; i <= n; i++) cout << f[i] << " ";
}