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 depth[500100];
vector<int> adj[500100];
map<int, int> H[500100];
void dfs1(int u, int par = 0) {
  depth[u] = 0;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v != par) {
      dfs1(v, u);
      depth[u] = max(depth[u], depth[v] + 1);
    }
  }
}
void dfs2(int u, int par = 0, int par_depth = 0) {
  int second_max_depth = depth[u] = 0;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i], tmp;
    if (v == par) {
      tmp = par_depth + 1;
    } else {
      tmp = depth[v] + 1;
    }
    if (depth[u] <= tmp) {
      second_max_depth = depth[u];
      depth[u] = tmp;
    } else if (second_max_depth < tmp) {
      second_max_depth = tmp;
    }
    H[u][tmp]++;
  }
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v != par) {
      if (depth[v] + 1 == depth[u]) {
        dfs2(v, u, second_max_depth);
      } else {
        dfs2(v, u, depth[u]);
      }
    }
  }
}
int ans[2 * 500100];
int main() {
  int n;
  while (scanf("%d", &n) > 0) {
    for (int i = 0; i < n - 1; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      adj[u].push_back(v);
      adj[v].push_back(u);
    }
    dfs1(1);
    dfs2(1);
    for (int i = 1; i <= n; i++) {
      ans[i] = 1;
    }
    for (int u = 1; u <= n; u++) {
      ans[1] = max(ans[1], (int)adj[u].size() + 1);
      ans[depth[u]] = max(ans[depth[u]], 2);
      if (depth[u]) ans[depth[u] - 1] = max(ans[depth[u] - 1], 2);
      map<int, int>::iterator it = H[u].end();
      int acum = 0;
      do {
        it--;
        int l = it->first;
        ans[2 * l + 1] = max(ans[2 * l + 1], acum + 1);
        acum += it->second;
        ans[2 * (l - 1) + 1] = max(ans[2 * (l - 1) + 1], acum);
        ans[2 * l] = max(ans[2 * l], acum);
      } while (it != H[u].begin());
      for (int i = 0; i < adj[u].size(); i++) {
        int v = adj[u][i];
        vector<pair<int, int> > Hm;
        map<int, int>::iterator itu = H[u].begin(), itv = H[v].begin();
        while (itu != H[u].end() or itv != H[v].end()) {
          if (itu == H[u].end()) {
            Hm.push_back(*itv);
            itv++;
          } else if (itv == H[v].end()) {
            Hm.push_back(*itu);
            itu++;
          } else if (itv->first < itu->first) {
            Hm.push_back(*itv);
            itv++;
          } else {
            Hm.push_back(*itu);
            itu++;
          }
        }
        int acum = 0;
        for (int j = Hm.size() - 1; j >= 0; j--) {
          int l = Hm[j].first;
          acum += Hm[j].second;
          ans[2 * l] = max(ans[2 * l], acum - 2);
        }
      }
    }
    for (int i = n - 2; i >= 1; i--) {
      ans[i] = max(ans[i], ans[i + 2]);
    }
    for (int i = 1; i <= n; i++) {
      if (i > 1) printf(" ");
      printf("%d", ans[i]);
    }
    printf("\n");
    for (int i = 1; i <= n; i++) {
      adj[i].clear();
      H[i].clear();
    }
  }
}