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 + 5;
int n, up[N], down[N];
set<pair<int, int>> ss;
int s1[N], s2[N], s3[N];
vector<int> adj[N], h[N];
int get(int p) {
  auto it = ss.upper_bound({-p, n});
  return !ss.empty() && it-- != ss.begin() ? it->second : -1;
}
void update(int en, int x) {
  if (get(en) >= x) return;
  auto l = ss.lower_bound({-en, 0}), r = l;
  while (r != ss.end() && r->second <= x) r++;
  ss.erase(l, r), ss.insert({-en, x});
}
void dfs_up(int u, int par) {
  for (auto v : adj[u])
    if (v ^ par) {
      dfs_up(v, u);
      up[u] = max(up[u], up[v] + 1);
    }
}
void dfs_down(int u, int par) {
  if (par) h[u] = {down[u]};
  int mx1 = down[u] + 1, mx2 = 0, sz = adj[u].size();
  for (auto v : adj[u])
    if (v ^ par)
      mx1 < up[v] + 2 ? mx2 = mx1, mx1 = up[v] + 2 : mx2 = max(mx2, up[v] + 2);
  for (auto v : adj[u])
    if (v ^ par) {
      down[v] = up[v] + 2 ^ mx1 ? mx1 : mx2;
      dfs_down(v, u), h[u].push_back(up[v] + 1);
    }
  ss.clear(), s2[0] = max(s2[0], sz + 1);
  sort(h[u].begin(), h[u].end());
  for (auto v : adj[u])
    if (v ^ par)
      for (int i = 0, en = h[v].size(); i < en; i++) {
        update(h[v][i], en - i - (down[v] >= h[v][i]) - 1);
        int ted = h[u].end() - lower_bound(h[u].begin(), h[u].end(), h[v][i]);
        s3[h[v][i]] = max(s3[h[v][i]], ted + en - i - (up[v] + 1 >= h[v][i]) -
                                           (down[v] >= h[v][i]));
      }
  for (int i = 0; i < sz; i++) {
    s1[h[u][i]] = max(s1[h[u][i]], sz - i);
    if (i + 1 < sz && h[u][i] < h[u][i + 1])
      s2[h[u][i]] = max(s2[h[u][i]], sz - i);
    s2[h[u][i] - 1] = max(s2[h[u][i] - 1], sz - i);
    s3[h[u][i]] = max(s3[h[u][i]], sz - i + get(h[u][i]));
  }
}
int main() {
  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_up(1, 0), dfs_down(1, 0);
  for (int i = n; ~i; i--) {
    s1[i] = max({s1[i], s1[i + 1], 1});
    s2[i] = max({s2[i], s2[i + 1], 1});
    s3[i] = max({s3[i], s3[i + 1], 1});
  }
  for (int i = 1; i <= n; i++)
    cout << max(s1[i + 1 >> 1], i & 1 ? s2[i >> 1] : s3[i >> 1]) << ' ';
}