#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <functional>
#include <vector>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cassert>
#define InfL 1000000000
#define InfLL 1000000000000000000LL
#define nmax_def 220000
#define mod 1000000007
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rrep(i,n) for(int (i)=(n-1);(i)>=(0);(i)--)
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<db> vd;

class Graph_class {
public:
	bool graph_from1 = true;
	bool graph_tree = false;
	bool graph_weight = false;
	bool graph_digraph = false;
	int Vnum;
	int Enum;
	vector<pii> edgelist;
	vl edgeweight;
	vector<vi> adjlist;
	vector<vl> adjlistweight;
	vi adjnum;

	vi adj_to_root;
	vector<int> DP;
	vi vlist_from_root;
	vl xdist;

	vb x_visited;
	deque<int> x_que;

	void read_edge();
	void read_edge_array();
	void adjini();
	void visited_ini();
	void graph_BFS(ll BFS_ini);
	void graph_DFS(ll DFS_ini);
	void graph_DFS_sbrt(ll DFS_ini);
	void Dijkstra(int x);
	bool Bellman_Ford(int x);
	ll diameter();
	void ReRooting(ll root);
	Graph_class Kruskal();
	int dim_num(int dim);
	void solve();

	bool xydist_def = false;
};

// ----- graph -----

void Graph_class::read_edge() {
	cin >> Vnum;
	Enum = Vnum;
	edgelist.resize(Enum);
	edgeweight.resize(Enum, 1);
	rep(i, Enum - 1) {
		edgelist[i].first = i;
		edgelist[i].second = i + 1;
	}
	cin >> edgelist[Enum - 1].first >> edgelist[Enum - 1].second;
	edgelist[Enum - 1].first--;
	edgelist[Enum - 1].second--;
	return;
}

void Graph_class::adjini() {
	adjnum.resize(Vnum);
	xdist.resize(Vnum, -1);
	adjlist.resize(Vnum);
	if (graph_weight)
		adjlistweight.resize(Vnum);
	adj_to_root.resize(Vnum, -1);
	DP.resize(Vnum, 0);
	rep(i, Vnum)
		adjnum[i] = 0;
	rep(i, Enum) {
		int x = edgelist[i].first;
		int y = edgelist[i].second;
		adjlist[x].push_back(y);
		if (!graph_digraph)
			adjlist[y].push_back(x);
		if (graph_weight) {
			ll xyweight = edgeweight[i];
			adjlistweight[x].push_back(xyweight);
			if (!graph_digraph)
				adjlistweight[y].push_back(xyweight);
		}
		adjnum[x]++;
		if (!graph_digraph)
			adjnum[y]++;
	}
	x_visited.resize(Vnum);
	visited_ini();

	return;
}

void Graph_class::visited_ini() {
	rep(i, Vnum) {
		x_visited[i] = false;
		adj_to_root[i] = -1;
	}
	x_que.clear();
}

void Graph_class::graph_BFS(ll BFS_ini) {
	visited_ini();
	x_que.push_back(BFS_ini);
	x_visited[BFS_ini] = true;

	// option
	xdist[BFS_ini] = 0;
	vlist_from_root.clear();
	vlist_from_root.push_back(BFS_ini);
	//cout << BFS_ini << endl;

	while (!x_que.empty()) {
		int x = x_que.front();
		x_que.pop_front();
		rep(i, adjnum[x]) {
			int x_new = adjlist[x][i];
			int dist_new = 1;
			if (graph_weight)
				dist_new = adjlistweight[x][i];
			if (!x_visited[x_new]) {
				x_visited[x_new] = true;
				x_que.push_back(x_new);

				// option
				adj_to_root[x_new] = x;
				vlist_from_root.push_back(x_new);
				xdist[x_new] = xdist[x] + dist_new;
				//cout << x_new << endl;
			}
		}
	}
	return;
}

void Graph_class::solve() {
	vl anslist(Vnum, 0);
	rep(i, Vnum) {
		graph_BFS(i);
		rep(j, Vnum) {
			anslist[xdist[j]]++;
		}
	}
	rep(i, Vnum) {
		if (i == 0)
			continue;
		cout << anslist[i] / 2 << endl;
	}
	//Graph_class tree = Kruskal();
	return;
}

int main(void) {
	Graph_class graph;
	graph.read_edge();
	graph.adjini();
	graph.solve();
	return 0;
}

Measured memory_bytes: 512