#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;

int n;
vector<pair<int, int> > ed;
vector<int> eds[50];
int was[50];
int ans[50];

int dfs(int v) {
	was[v] = 1;
	int sz = 1;
	for (int u: eds[v])
		if (!was[u])
			sz += dfs(u);
	return sz;
}

int main() {
	cin >> n;
	assert(n <= 20);
	for (int i = 0; i < n - 1; ++i) {
		int a, b;
		cin >> a >> b;
		--a;
		--b;
		ed.push_back(make_pair(a, b));
	}
	for (int i = 0; i <= n; ++i)
		ans[i] = 10000;
	for (int i = 0; i < (1 << (n - 1)); ++i) {
		for (int j = 0; j < n; ++j)
			eds[j].clear();
		for (int j = 0; j < (int)ed.size(); ++j)
			if (!((i >> j) & 1))
				eds[ed[j].first].push_back(ed[j].second), eds[ed[j].second].push_back(ed[j].first);
		memset(was, 0, sizeof(was[0]) * n);
		int go = 0;
		for (int j = 0; j < n; ++j)
			if (!was[j])
				go = max(go, dfs(j));
		ans[__builtin_popcount(i)] = min(ans[__builtin_popcount(i)], go);
	}
	for (int i = 1; i < n; ++i)
		cout << ans[i] << " ";
	cout << "\n";
	return 0;
}
