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>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <typename T1, typename T2>
inline void chkmin(T1 &first, T2 second) {
  if (first > second) first = second;
}
template <typename T1, typename T2>
inline void chkmax(T1 &first, T2 second) {
  if (first < second) first = second;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const pair<T, U> &_p) {
  _out << _p.first << ' ' << _p.second;
  return _out;
}
template <typename T, typename U>
inline istream &operator>>(istream &_in, pair<T, U> &_p) {
  _in >> _p.first >> _p.second;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const vector<T> &_v) {
  if (_v.empty()) {
    return _out;
  }
  _out << _v.front();
  for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline istream &operator>>(istream &_in, vector<T> &_v) {
  for (auto &_i : _v) {
    _in >> _i;
  }
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const set<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const multiset<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_set<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_multiset<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const map<T, U> &_m) {
  if (_m.empty()) {
    return _out;
  }
  _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')';
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) {
    _out << ", (" << _it->first << ": " << _it->second << ')';
  }
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const unordered_map<T, U> &_m) {
  if (_m.empty()) {
    return _out;
  }
  _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')';
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) {
    _out << ", (" << _it->first << ": " << _it->second << ')';
  }
  return _out;
}
const int N = 1e6 + 200;
int ans[N];
unordered_map<int, int> ansx[N];
vector<pair<int, int>> edge[N];
map<int, int> d[N];
int n;
int dfs(int i, int p = -1) {
  if (edge[i].size() == 0) return 0;
  if ((edge[i].back().first == 0 && edge[i].back().second != p) ||
      (edge[i][0].first == 0)) {
    for (auto &[d, j] : edge[i]) {
      if (d != 0) continue;
      if (j == p) continue;
      d = dfs(j, i) + 1;
    }
    sort(edge[i].rbegin(), edge[i].rend());
  }
  for (auto &[d, j] : edge[i]) {
    if (j == p) continue;
    assert(d != 0);
    return d;
  }
  return 0;
}
void solve(int i, int j) {
  if (make_pair(d[i].size(), i) > make_pair(d[j].size(), j)) {
    for (auto [v, cnt] : d[j]) d[i][v] += cnt;
    int alive = edge[i].size() + edge[j].size();
    d[i][ansx[i][j]] -= 1;
    d[i][ansx[j][i]] -= 1;
    for (auto [v, cnt] : d[i]) {
      chkmax(ans[v * 2], alive);
      alive -= cnt;
    }
    d[i][ansx[i][j]] += 1;
    d[i][ansx[j][i]] += 1;
    for (auto [v, cnt] : d[j]) {
      d[i][v] -= cnt;
      if (d[i][v] == 0) {
        d[i].erase(v);
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  srand(time(0));
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    edge[a].push_back({0, b});
    edge[b].push_back({0, a});
  }
  for (int i = 1; i <= n; ++i) {
    dfs(i);
    for (auto j : edge[i]) {
      d[i][j.first]++;
      ansx[i][j.second] = j.first;
    }
    d[i][0]++;
    int alive = edge[i].size() + 1;
    for (auto [v, cnt] : d[i]) {
      if (v) chkmax(ans[v * 2 - 1], alive + int(d[i].count(v - 1)));
      if (v) chkmax(ans[v * 2], alive);
      if (v) chkmax(ans[v * 2 - 1], alive);
      chkmax(ans[v], 2);
      alive -= cnt;
      chkmax(ans[v * 2 + 1], alive + 1);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (auto [d, j] : edge[i]) {
      solve(i, j);
    }
  }
  ans[N - 1] = 1;
  ans[N - 2] = 1;
  for (int i = N - 2; i--;) {
    chkmax(ans[i], ans[i + 2]);
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << ' ';
  }
  cout << '\n';
}