#include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <string>
#include <vector>
#include <bitset>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <queue>


typedef long long ll;
typedef long double ld;

using namespace std;

const int MAXN = 2000;
vector<int> eds[MAXN];

int ans[MAXN];
int n;
int was[MAXN];
int sz[MAXN];

int dfs(int v, int x) {
	int ans = 0;
	sz[v] = 1;
	was[v] = 1;
	vector<int> vv;
	for (int u: eds[v])
		if (!was[u])
			ans += dfs(u, x), sz[v] += sz[u], vv.push_back(sz[u]);
	sort(vv.begin(), vv.end());
	while (sz[v] > x) {
		sz[v] -= vv.back();
		vv.pop_back();
		++ans;
	}
	return ans;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n - 1; ++i) {
		int a, b;
		scanf("%d%d", &a, &b);
		--a;
		--b;
		eds[a].push_back(b);
		eds[b].push_back(a);
	}
	for (int i = 1; i <= n; ++i) {
		memset(was, 0, sizeof(was));
		ans[i] = dfs(0, i);
	}
	for (int i = 1; i < n; ++i) {
		for (int j = 1; j <= n; ++j)
			if (ans[j] <= i) {
				cout << j << " ";
				break;
			}
	}
	cout << "\n";
	return 0;
}


