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 = 500500;
vector<int> f[N];
int tmp[N];
int g[N];
int h[N];
int ans[N];
int hh[N];
int lon[N];
vector<int> adj[N];
int zero = 0;
int b2 = 0;
int n;
int& dp(const int& i, const int& j) {
  zero = 0;
  if (j > g[i]) return zero;
  return f[i][g[i] - j];
}
struct max2 {
  int first, second;
  max2() : first(-1), second(-1) {}
  void insert(int x) {
    if (x > first) {
      swap(first, second);
      first = x;
    } else if (x > second) {
      second = x;
    }
  }
  int other(int x) { return (x == first ? second : first); }
};
void prep(int u, int p, int hei) {
  hh[u] = hei;
  max2 m2;
  for (auto& v : adj[u]) {
    if (v == p) continue;
    prep(v, u, hei + 1);
    m2.insert(hh[v]);
    hh[u] = max(hh[u], hh[v]);
  }
  for (auto& v : adj[u]) {
    if (v == p) continue;
    lon[v] = max(hei - 1, m2.other(hh[v]) - hei + 1);
  }
}
void prep2(int u, int p, int b) {
  lon[u] = max(lon[u], b);
  for (auto& v : adj[u]) {
    if (v == p) continue;
    prep2(v, u, lon[u] + 1);
  }
}
void dfs(int u, int p, int hei) {
  pair<long long, long long> best(0, 0);
  for (auto& v : adj[u]) {
    if (v == p) continue;
    dfs(v, u, hei + 1);
    best = max(best, pair<long long, long long>(g[v], v));
  }
  ans[1] = max(ans[1], (int)adj[u].size() + 1);
  int q = -1;
  for (auto& v : adj[u]) {
    if (v == p) continue;
    if (v == best.second) continue;
    for (int i = 0; i <= g[v]; ++i) {
      tmp[i + 1]++;
    }
    q = max(g[v], q);
  }
  b2 = max((int)best.first + q + 2, b2);
  for (int i = 1; i <= min(q + 1, g[best.second]); ++i) {
    ans[i * 2] = max(ans[i * 2], tmp[i] + dp(best.second, i) + (lon[u] >= i));
  }
  f[u] = move(f[best.second]);
  g[u] = g[best.second];
  for (int i = 0; i <= h[best.second]; ++i) {
    dp(u, i) = 1;
  }
  g[u]++;
  f[u].push_back(0);
  for (int i = 1; i <= q + 1; ++i) {
    dp(u, i) += tmp[i];
    tmp[i] = 0;
  }
  h[u] = q + 1;
  for (auto& v : adj[u]) {
    if (v == p) continue;
    if (v == best.second) continue;
    for (int i = 1; i <= g[v]; ++i) {
      ans[i * 2] = max(ans[i * 2], dp(v, i) + dp(u, i) - 1 + (lon[u] >= i));
    }
  }
  for (int i = 1; i <= q + 1; ++i) {
    int ic = dp(u, i) + (lon[u] >= i);
    int ipc = dp(u, i + 1) + (lon[u] >= i + 1);
    ans[i * 2] = max(ans[i * 2], ic);
    ans[i * 2 + 1] = max(ans[i * 2 + 1], ipc + (ic > ipc));
  }
  b2 = max(b2, g[u] + lon[u]);
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (int i = 0; i <= n; ++i) {
    h[i] = g[i] = -1;
  }
  for (int i = 1; i <= n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
    ans[i] = 1;
  }
  prep(1, -1, 1);
  prep2(1, -1, 0);
  ans[n] = 1;
  dfs(1, -1, 1);
  for (int i = 1; i <= b2; ++i) {
    ans[i] = max(ans[i], 2);
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}