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>
#pragma GCC optimize("O3")
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
vector<long long> adj[505050];
long long h[505050];
long long a[505050];
long long d[505050];
void dfs1(long long i, long long p) {
  h[i] = 1;
  for (long long j : adj[i]) {
    if (j != p) {
      d[j] = d[i] + 1;
      dfs1(j, i);
      h[i] = max(h[i], h[j] + 1);
    }
  }
}
multiset<long long, greater<long long>> B;
vector<long long> A_[505050];
long long P[505050];
set<long long> S[505050];
void dfs2(long long i, long long p) {
  vector<long long> A;
  long long h1 = 0;
  long long h2 = 0;
  for (long long j : adj[i]) {
    if (j != p) {
      if (h[j] >= h1) {
        h2 = h1;
        h1 = h[j];
      } else if (h[j] >= h2) {
        h2 = h[j];
      }
    }
  }
  for (long long j : adj[i]) {
    if (j != p) {
      long long hh = 0;
      if (h[j] == h1)
        hh = h2;
      else
        hh = h1;
      B.insert(hh - d[i]);
      dfs2(j, i);
      B.erase(B.find(hh - d[i]));
      A.push_back(h[j]);
    }
  }
  if (!B.empty()) {
    P[i] = d[i] + (*B.begin());
    A.push_back(d[i] + (*B.begin()));
  }
  sort(A.begin(), A.end(), greater<long long>());
  S[i] = set<long long>(A.begin(), A.end());
  A_[i] = A;
  for (long long j = 1; j < A.size(); j++) {
    a[A[j] * 2] = max(a[A[j] * 2], j + 1);
    a[A[j] * 2 - 1] = max(a[A[j] * 2 - 1], j + 1);
    if (A[j] != A[j - 1]) {
      a[A[j] * 2 + 1] = max(a[A[j] * 2 + 1], j + 1);
    }
  }
}
long long kiek(const vector<long long> &a, long long x) {
  long long lo = 0;
  long long hi = a.size() - 1;
  while (lo < hi) {
    long long i = (lo + hi + 1) / 2;
    if (a[i] >= x)
      lo = i;
    else
      hi = i - 1;
  }
  return lo + 1;
}
void dfs3(long long i, long long p) {
  for (long long j : adj[i]) {
    if (j != p) {
      dfs3(j, i);
    }
  }
  if (p == i) return;
  vector<long long> &A = A_[i];
  vector<long long> a1 = {h[i]};
  vector<long long> a2 = {P[i]};
  for (long long j = 0; j < A.size(); j++) {
    vector<long long> V = {A[j], A[j] - 1, A[j] + 1, P[i], h[i]};
    auto it = S[p].lower_bound(A[j]);
    if (it != S[p].begin()) {
      it--;
      V.push_back(*it);
    }
    if (it != S[p].begin()) {
      it--;
      V.push_back(*it);
    }
    it = S[p].lower_bound(A[j]);
    if (it != S[p].end()) {
      V.push_back(*it);
      it++;
    }
    if (it != S[p].end()) {
      V.push_back(*it);
      it++;
    }
    for (long long x : V) {
      if (x >= 1) {
        if (h[i] >= x) {
          long long k1 = kiek(A, x) - kiek(a2, x);
          long long k2 = kiek(A_[p], x) - kiek(a1, x);
          if (k2 > 0) a[2 * x] = max(a[2 * x], k1 + k2);
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  for (long long i = 1; i < n; i++) {
    long long u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  fill_n(a, n + 1, 1);
  for (long long i = 1; i <= n; i++)
    a[1] = max(a[1], (long long)adj[i].size() + 1);
  dfs1(1, 1);
  dfs2(1, 1);
  dfs3(1, 1);
  for (long long i = n - 2; i >= 2; i--) a[i] = max(a[i], a[i + 2]);
  for (long long i = 1; i <= n; i++) cout << a[i] << " ";
}