Building a Decomposition
Easy
Execution time limit is 2 seconds
Runtime memory usage limit is 488.385 megabytes
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 Format
The first line contains a single integer , representing the number of vertices in the tree.
Each of the following lines contains two integers and , indicating an edge between vertices and .
Output Format
Output a string of n characters. If there are multiple valid outputs, you may provide any one of them.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 7
Acceptance rate 57%