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>
const int N = 500500;
const int mod = 1e9 + 7;
using namespace std;
int n;
int d[N];
int u[N];
int diam;
int par[N];
vector<int> v[N];
void dfs(int x, int p) {
  par[x] = p;
  for (int y : v[x]) {
    if (y == p) {
      continue;
    }
    dfs(y, x);
    d[x] = max(d[x], d[y] + 1);
  }
}
void trace(int x, int p, int up) {
  u[x] = up;
  pair<int, int> f = {0, 0};
  for (int y : v[x]) {
    if (y == p) {
      continue;
    }
    if (d[y] > d[f.first]) {
      f.second = f.first;
      f.first = y;
    } else if (d[y] > d[f.second]) {
      f.second = y;
    }
  }
  diam = max(diam, d[f.first] + d[f.second]);
  diam = max(diam, d[x] + u[x]);
  for (int y : v[x]) {
    if (y == p) {
      continue;
    }
    int nu = up;
    if (f.first == y) {
      nu = max(nu, d[f.second] + 1);
    } else {
      nu = max(nu, d[f.first] + 1);
    }
    trace(y, x, nu + 1);
  }
}
int K;
int in[N];
int A[N];
int B[N];
vector<pair<int, int> > D[N];
set<pair<int, int> > k0, k1;
vector<int> check_up[N];
vector<int> fail_up[N];
void get1(int x) {
  k1.erase({A[x], x});
  if (!D[x].empty() && D[x].back().first == K) {
    while (!D[x].empty() && D[x].back().first == K) {
      D[x].pop_back();
    }
    A[x] = D[x].size() + 1;
  } else {
    A[x] = D[x].size();
  }
  k1.insert({A[x], x});
}
void get0(int x) {
  if (x == -1) {
    return;
  }
  k0.erase({B[x], x});
  if (x == 1) {
    B[x] = D[x].size();
  } else if ((D[x].size() - (u[x] > K)) == 0) {
    B[x] = -1;
  } else {
    B[x] = D[x].size() + D[par[x]].size() - 1;
    if (u[x] > K) {
      B[x] -= 1;
    }
  }
  if (D[x].size() > 0) {
    B[x] = max(B[x], (int)D[x].size());
  }
  k0.insert({B[x], x});
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  d[0] = -1;
  dfs(1, 1);
  diam = d[1];
  trace(1, 1, 0);
  for (int i = 1; i <= n; i++) {
    for (int j : v[i]) {
      if (par[i] == j) {
        continue;
      }
      D[i].push_back({d[j] + 1, j});
    }
    if (i > 1) {
      D[i].push_back({u[i], -1});
    }
    sort(D[i].begin(), D[i].end());
    reverse(D[i].begin(), D[i].end());
    D[i].push_back({0, -1});
    for (int j = 0; j < D[i].size(); j++) {
      if (j > 0 && D[i][j].first == D[i][j - 1].first) {
        continue;
      }
      check_up[D[i][j].first].push_back(i);
      if (j > 0 && D[i][j].first + 1 != D[i][j - 1].first) {
        fail_up[D[i][j].first + 1].push_back(i);
      }
    }
  }
  int res0, res1;
  for (; K <= n / 2; K++) {
    res0 = res1 = 1;
    if (K * 2 <= diam) {
      res0 = 2;
    }
    if (K * 2 + 1 <= diam) {
      res1 = 2;
    }
    for (int x : check_up[K]) {
      get1(x);
    }
    for (int x : fail_up[K]) {
      get1(x);
    }
    if (k0.size() > 0) {
      res0 = max(res0, (--k0.end())->first);
    }
    if (k1.size() > 0) {
      res1 = max(res1, (--k1.end())->first);
    }
    if (K * 2 >= 1) {
      cout << res0 << " ";
    }
    if (K * 2 + 1 <= n) {
      cout << res1 << " ";
    }
    for (int x : check_up[K]) {
      get0(x);
      for (auto y : D[x]) {
        get0(y.second);
      }
    }
  }
}