URI Online Judge | 2496

The Only Chance

By Beatriz Souza, IFPB BR Brazil

Timelimit: 1

Everyone knows that the decisions that are made make all the difference in the result obtained. A well-known example is the Monty Hall paradox, which consists of three stages, and in the third, the competitor gives the final card and, depending on his choice, may or may not win a car.

You want to get an "Accepted" and for this you will have to write a program that checks if a single position change between two letters will result in an ordered sequence. Consider the following strings:

ABCDFGHIEJ

ABCDEFGHJIKLMNO

For the first sequence to be ordered, more than one change is required between the position of the letters. In the second, on the other hand, it is enough that I and J change positions. Its mission is to verify if for each sequence received there is a single exchange between two letters that makes it ordered.

Input

The input is composed of an integer N, which represents the number of test cases (1 <= N <= 100). Each test case consists of an integer M, which represents the number of letters of a sequence (2 <= M <= 26) and an alphabetical sequence composed of M letters. Letters are always uppercase and are not in an index greater than M. If M is 4, the only possible letters for the sequence are: A, B, C, or D in any order.

Output

For each reported sequence, the program must return a single line that will display "There are the chance." If the sequence obeys the ordering rule mentioned, or "There are not the chance." Otherwise.

Input Samples Output Samples

2
4
ABDC
4
ACDB

There are the chance.
There aren't the chance.

2

10
ABCDFGHIEJ

26
ZBCDEFGHIJKLMNOPQRSTUVWXYA

There aren't the chance.

There are the chance.