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 max_n = 500555, inf = 1000111222;
int n, ans[2 * max_n], h[max_n], hup[max_n];
vector<int> g[max_n];
void dfs(int v, int p) {
  h[v] = 0;
  for (int to : g[v]) {
    if (to == p) {
      continue;
    }
    dfs(to, v);
    h[v] = max(h[v], h[to] + 1);
  }
}
void dfs2(int v, int p) {
  if (p != -1) {
    hup[v] = max(hup[v], hup[p] + 1);
  }
  int mxh = 0, mxh2 = 0;
  for (int to : g[v]) {
    if (to == p) {
      continue;
    }
    if (mxh < h[to] + 1) {
      mxh2 = mxh;
      mxh = h[to] + 1;
    } else if (mxh2 < h[to] + 1) {
      mxh2 = h[to] + 1;
    }
  }
  for (int to : g[v]) {
    if (to == p) {
      continue;
    }
    hup[to] = mxh;
    if (h[to] + 1 == mxh) {
      hup[to] = mxh2;
    }
    ++hup[to];
    dfs2(to, v);
  }
}
vector<int> allh;
vector<pair<int, int>> diff[max_n];
void dfs3(int v, int p) {
  for (int to : g[v]) {
    if (to == p) {
      continue;
    }
    dfs3(to, v);
  }
  allh.clear();
  for (int to : g[v]) {
    if (to == p) {
      continue;
    }
    allh.push_back(h[to] + 1);
  }
  if (p != -1) {
    allh.push_back(hup[v]);
  }
  sort(allh.begin(), allh.end());
  reverse(allh.begin(), allh.end());
  for (int i = 0; i < allh.size(); ++i) {
    int h = allh[i];
    int pos = h * 2 - 1;
    int val = i + 1;
    ans[pos + 1] = max(ans[pos + 1], val);
    if (i + 1 < allh.size() && allh[i + 1] >= allh[i] - 1) {
      ++val;
    }
    ans[pos] = max(ans[pos], val);
    if (i + 1 < allh.size() && allh[i] > allh[i + 1]) {
      int pos = (allh[i + 1] + 1) * 2 - 1;
      int val = i + 2;
      ans[pos] = max(ans[pos], val);
    }
  }
  for (int i = 0; i < allh.size();) {
    int pos = i;
    while (i < allh.size() && allh[pos] == allh[i]) {
      ++i;
    }
    diff[v].push_back({allh[pos], i - pos});
  }
}
void dfs4(int v, int p) {
  for (int to : g[v]) {
    if (to == p) {
      continue;
    }
    dfs4(to, v);
  }
  if (p == -1) {
    return;
  }
  allh.clear();
  for (int to : g[v]) {
    if (to == p) {
      continue;
    }
    allh.push_back(h[to] + 1);
  }
  sort(allh.begin(), allh.end());
  reverse(allh.begin(), allh.end());
  int del = h[v] + 1;
  int pos1 = -1, pos2 = -1, cnt = 0, h = inf;
  while (pos1 + 1 < allh.size() || pos2 + 1 < diff[p].size()) {
    if (pos1 + 1 == allh.size()) {
      ++pos2;
      cnt += diff[p][pos2].second;
      h = diff[p][pos2].first;
      cnt -= (h == del);
    } else if (pos2 + 1 == diff[p].size()) {
      ++pos1;
      h = allh[pos1];
    } else if (allh[pos1 + 1] > diff[p][pos2 + 1].first) {
      ++pos1;
      h = allh[pos1];
    } else {
      ++pos2;
      cnt += diff[p][pos2].second;
      h = diff[p][pos2].first;
      cnt -= (h == del);
    }
    ans[h * 2] = max(ans[h * 2], cnt + pos1 + 1);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u;
    --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 1; i <= n; ++i) {
    ans[i] = 1;
  }
  for (int i = 0; i < n; ++i) {
    ans[1] = max(ans[1], (int)g[i].size() + 1);
  }
  dfs(0, -1);
  dfs2(0, -1);
  dfs3(0, -1);
  dfs4(0, -1);
  for (int i = n - 2; i >= 1; --i) {
    ans[i] = max(ans[i], ans[i + 2]);
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d ", ans[i]);
  }
  puts("");
  return 0;
}