In the Rolling Snowman game, $n$ snowmen of different types have already been stacked. These snowmen belong to one of three types: $A$, $B$, or $C$. The rules of the Rolling Snowman game are as follows: from the current queue of snowmen, choose any $2$ snowmen of different types and merge them into a new snowman of the type that is different from the two original types. For example, if you choose two snowmen of types $A$ and $B$, the new snowman will be of type $C$. If you choose types $A$ and $C$, the new snowman will be of type $B$; if you choose types $B$ and $C$, the new snowman will be of type $A$. The game ends when only snowmen of the same type remain in the queue. Xiao Ming and Xiao Xue want to complete the Rolling Snowman game using the minimum number of merges.
For a given queue of snowmen, calculate the type of the snowmen remaining in the queue after completing the Rolling Snowman game with the minimum number of merges.
Input
Each test case contains multiple sets of test data. The first line of each test data set contains a positive integer $n$, and the second line contains a string of length $n$ consisting of uppercase English letters A, B, and C, representing the initial queue of snowmen.
Output
For each test data set, output the type of the snowmen (A, B, or C) remaining in the queue after completing the Rolling Snowman game with the minimum number of merges. If the final type cannot be determined, output the uppercase letter N.
Examples
Input 1
5 ABCCC 3 ABC
Output 1
C N