Problem F: Circle Order

Time Limit: 1s

We have a circular train track on which a number of loaded cars are located. Each car has its own specified unloading position on the track. The cars can be moved in either direction along the track, but cannot pass each other.

We want to specify the order in which the cars should be moved. The order of cars must allow each car to be moved just once all the way to its unloading position where it will remain.

The cars are each named with a lowercase letter, and their destinations with the same letter but in uppercase. The positions of the cars and of their destinations are given by a sequence of letters that is regarded as circular by wrapping around the ends. So, for example, "BACacb" describes a situation in which going clockwise around the track we encounter B, A, C, a, c, b, and then return back to B. Here there are 3 different orders in which the cars could be moved to their destinations: 'a' then 'c' then 'b', 'a' then 'b' then 'c', or 'b' then 'a' then 'c'.

You are given the original positions in a non-empty string. If there exists an order in which all cars could be moved to their destinations, you should output "Yes". If no order is possible, you should output "No".

Input

Standard input will contain multiple test cases. The first line of the input is a single integer T (1 <= T <= 100) which is the number of test cases. T consecutive test cases follow.

For each case, there is only one line, describing the original position of all the cars and their destinations. Each character in the line will be a letter, 'a'-'z' or 'A'-'Z', and no character will appear more than once. You can assume that if a letter appears in the line, it will appear both in uppercase and in lowercase.

Output

For each test case, output "Yes" or "No" in one line, depending on whether there exists an order in which all cars could be moved to their destinations.

Sample Input

3
BACacb
ABCacb
XYxPyp

Sample Output

Yes
No
Yes

Hint

For Sample 1, it is the example given above. For Sample 2, we cannot move car 'c' first. If we move 'a' first, then we can never move 'b' to 'B', but if we move 'b' first we can never move 'a' to 'A'.