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 inf = (int)1.01e9;
const long long infll = (long long)1.01e18;
const long double eps = 1e-9;
const long double pi = acos((long double)-1);
mt19937 mrand(chrono::steady_clock::now().time_since_epoch().count());
int rnd(int x) { return mrand() % x; }
void precalc() {}
const int maxn = 5e5 + 5;
int n;
vector<int> g[maxn];
bool read() {
  if (scanf("%d", &n) < 1) {
    return false;
  }
  for (int i = 0; i < n; i++) {
    g[i].clear();
  }
  for (int i = 0; i < n - 1; i++) {
    int v, u;
    scanf("%d%d", &v, &u);
    v--;
    u--;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  return true;
}
int dep[maxn];
void dfs0(int v, int p) {
  dep[v] = 0;
  for (int i = 0; i < ((int)(g[v]).size()); i++) {
    int u = g[v][i];
    if (u == p) {
      continue;
    }
    dfs0(u, v);
    dep[v] = max(dep[v], dep[u] + 1);
  }
}
int ans[maxn];
int cnt[maxn];
vector<int> deps;
vector<pair<int, int>> udeps;
void dfs(int v, int p, int dup) {
  deps.clear();
  udeps.clear();
  if (dup) {
    deps.push_back(dup);
    udeps.push_back(make_pair(dup, v));
  }
  int mx[2] = {dup, -1};
  cnt[v] = 0;
  for (int i = 0; i < ((int)(g[v]).size()); i++) {
    int u = g[v][i];
    if (u == p) {
      continue;
    }
    int cur = dep[u] + 1;
    deps.push_back(cur);
    if (cur > mx[0]) {
      mx[1] = mx[0];
      mx[0] = cur;
    } else if (cur > mx[1]) {
      mx[1] = cur;
    }
    udeps.push_back(make_pair(cur, v));
    cnt[u] = 0;
    for (int j = 0; j < ((int)(g[u]).size()); j++) {
      int w = g[u][j];
      if (w == v) {
        continue;
      }
      udeps.push_back(make_pair(dep[w] + 1, u));
    }
  }
  {
    sort(deps.begin(), deps.end(), greater<int>());
    for (int i = 0; i < ((int)(deps).size()); i++) {
      int d = deps[i];
      ans[2 * d] = max(ans[2 * d], i + 1);
      ans[2 * d - 1] = max(ans[2 * d - 1], i + 1);
      if (i + 1 < ((int)(deps).size()) && deps[i + 1] >= d - 1) {
        ans[2 * d - 1] = max(ans[2 * d - 1], i + 2);
      }
      if (i && deps[i - 1] >= d + 1) {
        ans[2 * d + 1] = max(ans[2 * d + 1], i + 1);
      }
    }
    sort(udeps.begin(), udeps.end(), greater<pair<int, int>>());
    int best = -1;
    for (int i = 0; i < ((int)(udeps).size()); i++) {
      int d = udeps[i].first, u = udeps[i].second;
      cnt[u]++;
      if (u != v && (best == -1 || cnt[u] > cnt[best])) {
        best = u;
      }
      if (best != -1) {
        ans[2 * d] = max(ans[2 * d], (cnt[v] - 1) + cnt[best]);
      }
    }
    ans[1] = max(ans[1], ((int)(g[v]).size()) + 1);
  }
  for (int i = 0; i < ((int)(g[v]).size()); i++) {
    int u = g[v][i];
    if (u == p) {
      continue;
    }
    int nd = (mx[0] == dep[u] + 1 ? mx[1] : mx[0]) + 1;
    dfs(u, v, nd);
  }
}
void solve() {
  dfs0(0, -1);
  for (int i = 1; i <= n; i++) {
    ans[i] = 1;
  }
  dfs(0, -1, 0);
  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");
}
int main() {
  precalc();
  while (read()) {
    solve();
  }
  return 0;
}