- Time limit: 1.00 s
- Memory limit: 512 MB
Uolevi and Maija are trying out a space themed strategy game - Astralis. Since this is their first time playing, they will use the simplified rule set. The game is played on a galaxy that consists of solar systems connected by bidirectional wormholes. The -th wormhole connects solar systems and . It is guaranteed that there is a path between every pair of solar systems. Before the game starts the resources have to be distributed evenly between the players. Help Uolevi and Maija by dividing the galaxy into two equally sized connected components or report that this is impossible.
Input
First line contain a single integer .
The -th of the next lines contains two integers and .
Output
Print "Yes" if the task is possible and a string of length . The -th character of the string is U if solar system belongs to Uolevi and M if it belongs to Maija.
Print "No" otherwise
Constraints
- is divisible by 2
- if
Example 1
Input:
6 1 2 1 3 1 4 4 5 4 6
Output:
Yes UUUMMM
Example 2
Input:
6 1 2 2 3 1 4 1 5 1 6
Output:
No