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;
int n, q;
long long d1[500001], b1[500001];
long long d2[500001], b2[500001];
vector<int> adj[500001];
vector<int> r[500001];
void dfs(int id, int p) {
  for (auto cur : adj[id]) {
    if (cur == p) continue;
    dfs(cur, id);
    if (d2[id] < d1[cur] + 1) {
      d2[id] = d1[cur] + 1;
      b2[id] = cur;
    }
    if (d2[id] > d1[id]) {
      swap(d1[id], d2[id]);
      swap(b1[id], b2[id]);
    }
    r[id].push_back(d1[cur] + 1);
  }
  sort(r[id].begin(), r[id].end());
}
vector<int> v;
long long ans[1000001];
long long ans2[1000001];
void dfs2(int id, int p, long long pd) {
  bool duh = false;
  for (auto cur : adj[id]) {
    if (cur == p) continue;
    if (cur == b1[id])
      dfs2(cur, id, max(pd, d2[id]) + 1);
    else
      dfs2(cur, id, max(pd, d1[id]) + 1);
    if (adj[cur].size() >= 3) duh = true;
  }
  v.clear();
  for (auto cur : adj[id]) {
    if (cur == p) continue;
    v.push_back(1 + d1[cur]);
  }
  if (id != 1) v.push_back(pd);
  sort(v.begin(), v.end());
  int sz = v.size();
  if (v.size() >= 2) {
    int x = v.back();
    int y = v[v.size() - 2];
    ans[x + y] = max(ans[x + y], 2LL);
  }
  ans[1] = max(ans[1], (long long)v.size() + 1);
  vector<pair<int, int> > s;
  for (auto cur : adj[id]) {
    if (cur == p) continue;
    int ptr = 0;
    for (auto t : r[cur]) {
      s.push_back({t, r[cur].size() - ptr});
      ptr++;
    }
  }
  int zs = s.size();
  sort(s.begin(), s.end());
  for (int i = (int)s.size() - 1; i >= 1; i--) {
    s[i - 1].second = max(s[i - 1].second, s[i].second);
  }
  s.push_back({(long long)1e9, 0});
  for (int i = 0; i < (int)v.size() - 1; i++) {
    int cur = v[i];
    ans[cur * 2] = max(ans[cur * 2], (long long)sz - i);
    if (v[i + 1] != v[i])
      ans[cur * 2 + 1] = max(ans[cur * 2 + 1], (long long)sz - i);
  }
  for (int i = 0; i < (int)v.size(); i++) {
    int cur = v[i];
    int j =
        lower_bound(s.begin(), s.end(), (pair<int, int>){cur, 0}) - s.begin();
    ans2[cur * 2] = max(ans2[cur * 2], (long long)(sz - i) + s[j].second - 1);
  }
  for (int i = 0; i < (int)s.size() - 1; i++) {
    int cur = s[i].first;
    int j = lower_bound(v.begin(), v.end(), cur) - v.begin();
    ans2[cur * 2] = max(ans2[cur * 2], (long long)(sz - j) + s[i].second - 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1, 0);
  dfs2(1, 0, 0);
  for (int i = 2 * n - 1; i >= 1; i--) ans[i] = max(ans[i + 1], ans[i]);
  for (int i = 2 * n - 2; i >= 2; i--) ans2[i] = max(ans2[i + 2], ans2[i]);
  for (int i = 1; i <= n; i++) {
    ans[i] = max(ans[i], ans2[i]);
    cout << max(ans[i], 1LL) << ' ';
  }
  cout << endl;
}