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 M = 750;
const int N = 500500;
int P[N];
int Dp1[N];
int Dp2[N];
int Ans[2 * N];
vector<pair<int, int> > Edges;
vector<int> Adj[N];
vector<pair<int, int> > DpAdj[N];
int Cnt[N];
int CntCnt[N];
vector<int> Have[N];
int Temp3[N];
vector<int> Temp1;
vector<int> Temp2;
void max_self(int& x, int y) {
  if (x < y) x = y;
}
void DFS1(int x = 1, int p = 0) {
  P[x] = p;
  for (int y : Adj[x])
    if (y ^ p) DFS1(y, x), max_self(Dp1[x], 1 + Dp1[y]);
}
void DFS2(int x = 1, int p = 0) {
  int Max1 = 0, Max2 = 0;
  for (int y : Adj[x]) {
    if (y ^ p) {
      int Cur = Dp1[y] + 1;
      if (Cur > Max1)
        Max2 = Max1, Max1 = Cur;
      else
        max_self(Max2, Cur);
    }
  }
  for (int y : Adj[x]) {
    if (y ^ p) {
      max_self(Dp2[y], Dp2[x] + 1);
      max_self(Dp2[y], (Dp1[y] + 1 == Max1 ? Max2 : Max1) + 1);
    }
  }
  for (int y : Adj[x])
    if (y ^ p) DFS2(y, x);
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    Adj[x].push_back(y);
    Adj[y].push_back(x);
    Edges.emplace_back(x, y);
  }
  DFS1();
  DFS2();
  for (int x = 1; x <= n; x++) {
    for (int y : Adj[x])
      DpAdj[x].emplace_back(y == P[x] ? Dp2[x] : Dp1[y] + 1, y);
    sort(DpAdj[x].begin(), DpAdj[x].end(), greater<pair<int, int> >());
    for (int i = 0; i < DpAdj[x].size(); i++) {
      max_self(Ans[2 * DpAdj[x][i].first], i + 1);
      max_self(Ans[2 * DpAdj[x][i].first - 1], i + 1);
    }
  }
  for (int x = 1; x <= n; x++) {
    for (int i = 0, j = 0; i < DpAdj[x].size(); i++) {
      while (j < i && DpAdj[x][j].first > DpAdj[x][i].first) j++;
      max_self(Ans[2 * DpAdj[x][i].first + 1], j + 1);
    }
  }
  for (int x = 1; x <= n; x++) {
    if (Adj[x].size() >= M) {
      for (int y : Adj[x])
        for (pair<int, int> z : DpAdj[y])
          if (z.second ^ x) Have[z.first].push_back(y);
      int MaxCnt = 0;
      int MinDist = n;
      for (int i = 0; i < DpAdj[x].size(); i++) {
        for (; MinDist >= DpAdj[x][i].first; MinDist--) {
          for (int y : Have[MinDist]) {
            CntCnt[Cnt[y]]--;
            max_self(MaxCnt, ++Cnt[y]);
            CntCnt[Cnt[y]]++;
          }
          max_self(Ans[2 * MinDist], MaxCnt + i);
        }
        int y = DpAdj[x][i].second;
        if (MaxCnt == Cnt[y] && CntCnt[Cnt[y]] == 1) MaxCnt--;
        CntCnt[Cnt[y]]--;
        CntCnt[--Cnt[y]]++;
        max_self(Ans[2 * (MinDist + 1)], MaxCnt + i + 1);
      }
      for (; MinDist > 0; MinDist--) {
        for (int y : Have[MinDist]) {
          CntCnt[Cnt[y]]--;
          max_self(MaxCnt, ++Cnt[y]);
          CntCnt[Cnt[y]]++;
        }
        max_self(Ans[2 * MinDist], MaxCnt + (int)DpAdj[x].size() - 1);
      }
      for (int i = 1; i <= n; i++) Cnt[i] = CntCnt[i] = 0, Have[i].clear();
    }
  }
  for (pair<int, int> p : Edges) {
    int x = p.first, y = p.second;
    if (Adj[x].size() < M && Adj[y].size() < M) {
      Temp1.clear();
      Temp2.clear();
      for (pair<int, int> z : DpAdj[x])
        if (z.second ^ y) Temp1.push_back(z.first);
      for (pair<int, int> z : DpAdj[y])
        if (z.second ^ x) Temp2.push_back(z.first);
      merge(Temp1.begin(), Temp1.end(), Temp2.begin(), Temp2.end(), Temp3,
            greater<int>());
      for (int i = 0; i < Temp1.size() + Temp2.size(); i++)
        max_self(Ans[2 * Temp3[i]], i + 1);
    }
  }
  for (int i = 1; i < 2 * N; i++) max_self(Ans[i], 1);
  for (int x = 1; x <= n; x++) max_self(Ans[1], Adj[x].size() + 1);
  for (int x = 1; x <= n; x++) max_self(Ans[max(Dp1[x], Dp2[x])], 2);
  for (int x = 1; x <= n; x++) max_self(Ans[max(Dp1[x], Dp2[x]) - 1], 2);
  for (int i = 2 * N - 3; i > 1; i--) max_self(Ans[i], Ans[i + 2]);
  for (int i = 1; i <= n; i++) printf("%d ", Ans[i]);
  puts("");
}