Building a Decomposition#10159

Building a Decomposition

2 seconds
488.385 megabytes
Easy

Construct the centroid decomposition of a tree.

Assign the symbol to the vertex at the first level, to the vertex at the second level, and continue similarly for subsequent levels.

Input

The first line contains a single integer (1 ≤ n ≤ 2 \cdot 10^5), representing the number of vertices in the tree.

Each of the following n - 1 lines contains two integers v_i and u_i (1 ≤ v_i, u_i ≤ n), indicating an edge between vertices v_i and u_i.

Output

Output a string of characters. If there are multiple valid outputs, you may provide any one of them.

A.png

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading