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;
int N;
vector<int> edges[500000];
int mx[500000];
map<int, int> dp[500000];
int dfs(int i, int par) {
  for (int j : edges[i])
    if (j != par) {
      int res = dfs(j, i);
      dp[i][res]++;
    }
  if (dp[i].size()) mx[i] = dp[i].rbegin()->first;
  return mx[i] + 1;
}
void chmax(int& a, int b) { a = max(a, b); }
int ans[500010], ans2[500010];
void dfs2(int i, int par) {
  int sum = 0;
  for (auto it = dp[i].rbegin(); it != dp[i].rend(); it++) {
    int mn = it->first, s = it->second;
    if (sum + 1 >= 2) chmax(ans[2 * mn + 1], sum + 1);
    if (sum + s >= 2) chmax(ans[2 * mn], sum + s);
    sum += s;
  }
  for (int j : edges[i])
    if (j != par) {
      int del = mx[j] + 1;
      dp[i][del]--;
      if (dp[i][del] == 0) dp[i].erase(del);
      for (auto& p : dp[j]) dp[i][p.first] += p.second;
      int sum = 0;
      for (auto it = dp[i].rbegin(); it != dp[i].rend(); it++) {
        int mn = it->first, s = it->second;
        sum += s;
        if (sum >= 2) {
          int x = 2 * mn;
          chmax(ans2[x], sum);
        }
      }
      for (auto& p : dp[j]) {
        dp[i][p.first] -= p.second;
        if (dp[i][p.first] == 0) dp[i].erase(p.first);
      }
      int u = 1;
      if (dp[i].size()) u += dp[i].rbegin()->first;
      dp[j][u]++;
      dfs2(j, i);
      dp[i][del]++;
    }
}
int main() {
  cin >> N;
  for (int i = 0; i < N - 1; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    edges[a - 1].push_back(b - 1);
    edges[b - 1].push_back(a - 1);
  }
  for (int i = 0; i < N; i++) chmax(ans[1], 1 + edges[i].size());
  ans[N] = 1;
  dfs(0, -1);
  dfs2(0, -1);
  for (int i = N - 1; i > 0; i--) chmax(ans[i], ans[i + 1]);
  for (int i = N / 2 * 2; i > 0; i -= 2) chmax(ans2[i], ans2[i + 2]);
  for (int i = 1; i <= N; i++)
    printf("%d%c", max(ans[i], ans2[i]), " \n"[i == N]);
  return 0;
}