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;
using ll = long long;
using ld = long double;
using D = double;
using uint = unsigned int;
template <typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn = 500005;
vector<int> gr[maxn];
vector<int> tails[maxn], addbelow[maxn];
int n;
int anseven[maxn], ansstar[maxn], answer[maxn];
int longest[maxn];
int ansodd[maxn];
int diameter = 0;
void godown(int cur, int pr) {
  for (auto t : gr[cur])
    if (t != pr) {
      godown(t, cur);
      tails[cur].push_back(longest[t] + 1);
    }
  sort((tails[cur]).begin(), (tails[cur]).end());
  if (tails[cur].empty())
    longest[cur] = 0;
  else
    longest[cur] = tails[cur].back();
}
inline int getcnt(vector<int> &t, int x) {
  return t.end() - lower_bound((t).begin(), (t).end(), x);
}
void calcans(int cur, int pr, int fromup) {
  addbelow[cur].resize(tails[cur].size() + 1);
  for (auto t : gr[cur])
    if (t != pr) {
      for (auto len : tails[t]) {
        int cnt1 = getcnt(tails[t], len);
        int cnt2 = getcnt(tails[cur], len);
        int cnt = cnt1 + cnt2 - 1;
        anseven[len] = max(anseven[len], cnt);
        int wh = (int)tails[cur].size() - cnt2;
        if (wh < (int)tails[cur].size() && tails[cur][wh] == len) {
        } else
          wh--;
        if (wh >= 0) addbelow[cur][wh] = max(addbelow[cur][wh], cnt1);
      }
      int push = fromup;
      if (longest[cur] == longest[t] + 1) {
        if (tails[cur].size() > 1)
          push = max(push, tails[cur][(int)tails[cur].size() - 2]);
      } else
        push = max(push, longest[cur]);
      diameter = max(diameter, push + 1 + longest[t]);
      tails[t].push_back(push + 1);
      sort((tails[t]).begin(), (tails[t]).end());
      calcans(t, cur, push + 1);
    }
  for (int i = (int)tails[cur].size() - 1; i >= 0; i--) {
    int len = tails[cur][i];
    if (2 * len + 1 < maxn)
      ansodd[len * 2 + 1] =
          max(ansodd[len * 2 + 1], 1 + getcnt(tails[cur], len + 1));
    anseven[len] = max(anseven[len], (int)tails[cur].size() - i);
    anseven[len] =
        max(anseven[len], (int)tails[cur].size() - i - 1 + addbelow[cur][i]);
    ansstar[len] = max(ansstar[len], (int)tails[cur].size() - i);
    if (i > 0)
      addbelow[cur][i - 1] = max(addbelow[cur][i - 1], addbelow[cur][i]);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    a--, b--;
    gr[a].push_back(b);
    gr[b].push_back(a);
  }
  godown(0, -1);
  calcans(0, -1, 0);
  for (int i = n; i > 0; i--) anseven[i - 1] = max(anseven[i - 1], anseven[i]);
  for (int i = n; i > 0; i--) ansstar[i - 1] = max(ansstar[i - 1], ansstar[i]);
  int modd = n;
  if (modd % 2 == 0) modd--;
  for (int i = modd; i > 1; i -= 2)
    ansodd[i - 2] = max(ansodd[i - 2], ansodd[i]);
  for (int i = 1; i <= n; i++) answer[i] = 1;
  for (int i = 0; i < n; i++) answer[1] = max(answer[1], 1 + (int)gr[i].size());
  for (int i = 1; i <= diameter; i++) answer[i] = max(answer[i], 2);
  for (int i = 2; i <= n; i++) {
    if (i % 2 == 0)
      answer[i] = max(answer[i], anseven[i / 2]);
    else {
      answer[i] = max(answer[i], ansstar[(i + 1) / 2]);
      answer[i] = max(answer[i], ansodd[i]);
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", answer[i]);
  printf("\n");
  return 0;
}