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("Ofast,no-stack-protector")
using namespace std;
const int N = 5e5 + 3;
vector<int> adj[N], dist[N];
int dep[N], ans[N], dep1[N];
pair<int, int> edge[N];
vector<pair<int, int> > lis[N];
void dfs(int x, int p) {
  for (int i : adj[x]) {
    if (i != p) {
      dfs(i, x);
      dep[x] = max(dep[x], dep[i] + 1);
      dist[x].push_back(dep[i] + 1);
    }
  }
  sort(dist[x].begin(), dist[x].end());
}
void dfs1(int x, int p) {
  for (int i : adj[x]) {
    if (i != p) {
      dep1[i] = dep1[x] + 1;
      if (dep[i] == dist[x].back() - 1) {
        if (dist[x].size() > 1) {
          dep1[i] = max(dep1[i], dist[x][dist[x].size() - 2] + 1);
        }
      } else {
        dep1[i] = max(dep1[i], dist[x].back() + 1);
      }
      dfs1(i, x);
    }
  }
  if (x != 1) {
    dist[x].push_back(dep1[x]);
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, i, j, k, l, maxeven, maxodd, sum;
  cin >> n;
  maxeven = (n / 2) * 2;
  if ((n & 1)) {
    maxodd = n;
  } else {
    maxodd = n - 1;
  }
  for (i = 1; i < n; i++) {
    cin >> j >> k;
    edge[i] = {j, k};
    adj[j].push_back(k);
    adj[k].push_back(j);
  }
  dfs(1, 1);
  for (i = 1; i <= n; i++) {
    for (j = 0; j < dist[i].size(); j++) {
      k = dist[i][j];
    }
  }
  dfs1(1, 1);
  for (i = 1; i <= n; i++) {
    sort(dist[i].begin(), dist[i].end());
    ans[1] = max(ans[1], (int)adj[i].size() + 1);
    for (j = dist[i].size() - 1; j > -1; j--) {
      k = dist[i][j];
      ans[min(2 * k, maxeven)] =
          max(ans[min(2 * k, maxeven)], (int)dist[i].size() - j);
      ans[min(2 * k - 1, maxodd)] =
          max(ans[min(2 * k - 1, maxodd)], (int)dist[i].size() - j);
      if (j != dist[i].size() - 1 && dist[i][j] != dist[i][j + 1]) {
        ans[min(2 * k + 1, maxodd)] =
            max(ans[min(2 * k + 1, maxodd)], (int)dist[i].size() - j);
      }
    }
    j = k = 0;
    while (j < dist[i].size()) {
      while (k < dist[i].size() && dist[i][j] == dist[i][k]) {
        k++;
      }
      lis[i].push_back({dist[i][j], k - j});
      j = k;
    }
  }
  for (i = 1; i < n; i++) {
    j = edge[i].first;
    k = edge[i].second;
    vector<pair<int, int> > temp;
    for (auto ite : lis[j]) {
      temp.push_back(ite);
    }
    for (auto ite : lis[k]) {
      temp.push_back(ite);
    }
    sort(temp.begin(), temp.end());
    sum = 0;
    for (j = temp.size() - 1; j > -1; j--) {
      k = temp[j].first;
      sum += temp[j].second;
      ans[min(2 * k, maxeven)] = max(ans[min(2 * k, maxeven)], sum - 2);
    }
  }
  for (i = maxodd; i > 1; i -= 2) {
    ans[i] = max(ans[i], ans[i + 2]);
  }
  for (i = maxeven; i > 1; i -= 2) {
    ans[i] = max(ans[i], ans[i + 2]);
  }
  for (i = 1; i <= n; i++) {
    cout << max(ans[i], 1) << ' ';
  }
}