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;
template <typename T>
vector<T>& operator--(vector<T>& v) {
  for (auto& i : v) --i;
  return v;
}
template <typename T>
vector<T>& operator++(vector<T>& v) {
  for (auto& i : v) ++i;
  return v;
}
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& i : v) is >> i;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T>& v) {
  for (auto& i : v) os << i << ' ';
  return os;
}
template <typename T, typename U>
istream& operator>>(istream& is, pair<T, U>& p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T, typename U>
ostream& operator<<(ostream& os, pair<T, U>& p) {
  os << p.first << ' ' << p.second;
  return os;
}
template <typename T, typename U>
pair<T, U> operator-(pair<T, U> a, pair<T, U> b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
template <typename T, typename U>
pair<T, U> operator+(pair<T, U> a, pair<T, U> b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
template <typename T, typename U>
void umin(T& a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
void umax(T& a, U b) {
  if (a < b) a = b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<vector<int>> g(n);
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  vector<pair<int, int>> maxd(n, {0, 0});
  vector<int> dup(n, 0);
  vector<bool> u(n, false);
  vector<vector<int>> ds(n);
  function<void(int)> dfs1 = [&](int v) {
    u[v] = true;
    for (auto k : g[v]) {
      if (!u[k]) {
        dfs1(k);
        int d = maxd[k].first + 1;
        ds[v].push_back(d);
        if (d >= maxd[v].first) {
          maxd[v].second = maxd[v].first;
          maxd[v].first = d;
        } else if (d > maxd[v].second) {
          maxd[v].second = d;
        }
      }
    }
  };
  dfs1(0);
  u.assign(n, false);
  function<void(int, int)> dfs2 = [&](int v, int p) {
    u[v] = true;
    if (p != -1) {
      dup[v] = dup[p] + 1;
      if (maxd[v].first + 1 == maxd[p].first)
        dup[v] = max(dup[v], maxd[p].second + 1);
      else
        dup[v] = max(dup[v], maxd[p].first + 1);
      ds[v].push_back(dup[v]);
    }
    for (auto k : g[v]) {
      if (!u[k]) {
        dfs2(k, v);
      }
    }
  };
  dfs2(0, -1);
  vector<int> ans(n * 2 + 25, 1);
  for (int i = 0; i < n; ++i) {
    ans[1] = max(ans[1], (int)g[i].size() + 1);
  }
  vector<vector<pair<int, int>>> dsc(n);
  for (int i = 0; i < n; ++i) {
    sort(ds[i].begin(), ds[i].end());
    for (int j = 0; j < ds[i].size(); ++j) {
      if (j == 0 || ds[i][j] != ds[i][j - 1]) dsc[i].emplace_back(ds[i][j], 0);
      dsc[i].back().second++;
    }
  }
  u.assign(n, false);
  function<void(int)> dfs3 = [&](int v) {
    u[v] = true;
    for (auto k : g[v]) {
      if (!u[k]) {
        dfs3(k);
        vector<pair<int, int>> cnt;
        int i1 = 0, i2 = 0;
        while (i1 < dsc[v].size() || i2 < dsc[k].size()) {
          if (i1 == dsc[v].size()) {
            cnt.push_back(dsc[k][i2]);
            ++i2;
          } else if (i2 == dsc[k].size()) {
            cnt.push_back(dsc[v][i1]);
            ++i1;
          } else {
            if (dsc[v][i1] < dsc[k][i2]) {
              cnt.push_back(dsc[v][i1]);
              ++i1;
            } else if (dsc[v][i1] > dsc[k][i2]) {
              cnt.push_back(dsc[k][i2]);
              ++i2;
            } else {
              cnt.push_back(dsc[v][i1]);
              cnt.back().second += dsc[k][i2].second;
              ++i1;
              ++i2;
            }
          }
        }
        for (int i = 0; i < cnt.size(); ++i) {
          if (cnt[i].first == maxd[k].first + 1) {
            cnt[i].second--;
            break;
          }
        }
        for (int i = 0; i < cnt.size(); ++i) {
          if (cnt[i].first == dup[k]) {
            cnt[i].second--;
            break;
          }
        }
        for (int i = (int)cnt.size() - 2; i >= 0; --i) {
          cnt[i].second += cnt[i + 1].second;
        }
        for (auto [d, c] : cnt) ans[d * 2] = max(ans[d * 2], c);
      }
    }
  };
  dfs3(0);
  for (int v = 0; v < n; ++v) {
    for (int i = (int)dsc[v].size() - 2; i >= 0; --i) {
      dsc[v][i].second += dsc[v][i + 1].second;
    }
  }
  for (int v = 0; v < n; ++v) {
    for (int i = 0; i < dsc[v].size(); ++i) {
      int w = dsc[v][i].second + 1;
      if (i != 0 && dsc[v][i - 1].first + 1 == dsc[v][i].first)
        w = min(w, dsc[v][i - 1].second);
      else
        w = min(w, dsc[v][i].second);
      int x = 2 * dsc[v][i].first - 1;
      ans[x] = max(ans[x], w);
      x += 2;
      w = dsc[v][i].second;
      if (i + 1 != dsc[v].size())
        w = min(w, dsc[v][i + 1].second + 1);
      else
        w = 0;
      ans[x] = max(ans[x], w);
      x = 2 * dsc[v][i].first;
      ans[x] = max(ans[x], dsc[v][i].second);
    }
  }
  for (int i = n - 2; i >= 2; --i) ans[i] = max(ans[i], ans[i + 2]);
  for (int i = 0; i < n; ++i) {
    cout << ans[i + 1] << ' ';
  }
  cout << '\n';
  return 0;
}