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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 500500;
int n;
vector<int> g[N];
int ans[N];
vector<pair<int, int> > a[N];
int d[N];
int toUp[N];
void dfs1(int v, int par) {
  d[v] = 0;
  for (int u : g[v]) {
    if (u == par) continue;
    dfs1(u, v);
    d[v] = max(d[v], d[u] + 1);
  }
}
void dfs2(int v, int tu) {
  toUp[v] = tu;
  pair<int, int> b[2];
  b[0] = b[1] = make_pair(-1, -1);
  b[0].first = max(tu, 0) + 1;
  for (int u : g[v]) {
    if (d[u] > d[v]) continue;
    pair<int, int> w = make_pair(d[u] + 2, u);
    for (int i = 0; i < 2; i++) {
      if (w > b[i]) swap(w, b[i]);
    }
  }
  for (int u : g[v]) {
    if (d[u] > d[v]) continue;
    int t = 0;
    while (b[t].second == u) t++;
    dfs2(u, b[t].first);
  }
}
inline void updAns(int p, int x) { ans[p] = max(ans[p], x); }
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int v, u;
    scanf("%d%d", &v, &u);
    v--;
    u--;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  dfs1(0, -1);
  dfs2(0, -1);
  vector<int> cur;
  for (int v = 0; v < n; v++) {
    cur.clear();
    if (toUp[v] != -1) cur.push_back(toUp[v]);
    for (int u : g[v])
      if (d[u] < d[v]) cur.push_back(d[u] + 1);
    sort(cur.begin(), cur.end());
    for (int x : cur) {
      if (a[v].empty() || a[v].back().first != x) {
        a[v].push_back(make_pair(x, 1));
      } else {
        a[v].back().second++;
      }
    }
  }
  for (int i = 1; i <= n; i++) ans[i] = 1;
  int diam = 0;
  for (int v = 0; v < n; v++) diam = max(diam, a[v].back().first);
  for (int i = 1; i <= diam; i++) ans[i] = 2;
  for (int v = 0; v < n; v++) ans[1] = max(ans[1], 1 + (int)g[v].size());
  for (int v = 0; v < n; v++) {
    int sum = (int)g[v].size();
    for (int i = 0; i < (int)a[v].size(); i++) {
      int c = sum;
      updAns(2 * (int)a[v][i].first - 1, sum);
      if (i > 0) updAns(2 * (int)a[v][i - 1].first + 1, sum + 1);
      updAns(2 * (int)a[v][i].first, sum);
      sum -= a[v][i].second;
    }
  }
  for (int v = 0; v < n; v++)
    for (int u : g[v]) {
      if (u < v) continue;
      int sum = (int)g[v].size() + (int)g[u].size() - 2;
      int p1 = 0, p2 = 0;
      while (p1 < (int)a[v].size() && p2 < (int)a[u].size()) {
        int x = min(a[v][p1].first, a[u][p2].first);
        updAns(2 * x, sum);
        if (a[v][p1].first == x) {
          sum -= a[v][p1].second;
          p1++;
        }
        if (a[u][p2].first == x) {
          sum -= a[u][p2].second;
          p2++;
        }
      }
    }
  for (int i = n - 2; i > 1; i--) ans[i] = max(ans[i], ans[i + 2]);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}