The Resistance is trying to take control over as many planets of a particular solar system as possible. Princess Heidi is in charge of the fleet, and she must send ships to some planets in order to maximize the number of controlled planets.

The Galaxy contains N planets, connected by bidirectional hyperspace tunnels in such a way that there is a unique path between every pair of the planets.

A planet is controlled by the Resistance if there is a Resistance ship in its orbit, or if the planet lies on the shortest path between some two planets that have Resistance ships in their orbits.

Heidi has not yet made up her mind as to how many ships to use. Therefore, she is asking you to compute, for every K = 1, 2, 3, ..., N, the maximum number of planets that can be controlled with a fleet consisting of K ships.

Input

The first line of the input contains an integer N (1 ≤ N ≤ 105) – the number of planets in the galaxy.

The next N - 1 lines describe the hyperspace tunnels between the planets. Each of the N - 1 lines contains two space-separated integers u and v (1 ≤ u, v ≤ N) indicating that there is a bidirectional hyperspace tunnel between the planets u and v. It is guaranteed that every two planets are connected by a path of tunnels, and that each tunnel connects a different pair of planets.

Output

On a single line, print N space-separated integers. The K-th number should correspond to the maximum number of planets that can be controlled by the Resistance using a fleet of K ships.

Examples

Input

3
1 2
2 3


Output

1 3 3 

Input

4
1 2
3 2
4 2


Output

1 3 4 4 

Note

Consider the first example. If K = 1, then Heidi can only send one ship to some planet and control it. However, for K ≥ 2, sending ships to planets 1 and 3 will allow the Resistance to control all planets.
#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const long long MXN = 1e5 + 10;
long long n, root, tot, p;
long long dis[MXN], dad[MXN], ANS[MXN];
pair<long long, long long> far[MXN];
bool vis[MXN];
vector<long long> adj[MXN];
priority_queue<pair<long long, long long>, vector<pair<long long, long long>>>
    pq;
void DFS(long long u, long long par) {
  dad[u] = par, far[u] = {0, u};
  for (auto v : adj[u]) {
    if (v != par) {
      dis[v] = dis[u] + 1;
      DFS(v, u);
      far[v].first++;
      far[u] = max(far[u], far[v]);
      far[v].first--;
    }
  }
}
void dfs(long long u, long long par) {
  if (dis[u] >= dis[root]) root = u;
  for (auto v : adj[u]) {
    if (v != par) {
      dis[v] = dis[u] + 1;
      dfs(v, u);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i < n; i++) {
    long long u, v;
    cin >> u >> v;
    adj[u].push_back(v), adj[v].push_back(u);
  }
  dfs(1, 0);
  dis[root] = 0;
  DFS(root, 0);
  for (int i = 1; i <= n; i++) pq.push(far[i]);
  ANS[1] = p = vis[0] = 1;
  while (!pq.empty()) {
    long long d, u, f = 0;
    tie(d, u) = pq.top();
    pq.pop();
    while (!vis[u]) {
      vis[u] = 1, tot++;
      u = dad[u];
      f = 1;
    }
    if (f) ANS[++p] = tot;
  }
  for (p++; p <= n; p++) ANS[p] = tot;
  for (int i = 1; i <= n; i++) cout << ANS[i] << ' ';
  return 0;
}
