Aibohphobia

Time limit: 0.7s Memory limit: 256MB Input: Output:

It's not a situation, it's a condition. Electromagnetic Hypersensitivity. For reasons unknown, my nervous system has become sensitized to certain frequencies of electromagnetic radiation.

• Chuck McGill, Better Call Saul

Chuck McGill suffers from electromagnetic hypersensitivity: he is afraid of electricity. But did you know he is also afraid of palindromes?

Once he received a string $s$ as a birthday present from Jimmy. He wants to rearrange its symbols, obtaining string $t$, so that the following condition holds:

• For every $i = 2, 3, \ldots, |s|$, string $t_1t_2\ldots t_i$ is not a palindrome.

Can you help him?

As a reminder, a string $s$ is called a palindrome, if it reads the same backwards as forwards. For example, aibohphobia is a palindrome.

Input data

The first line contains a single integer $t$ ($1 \le t \le 10^5$) - the number of test cases. The description of test cases follows.

The only line of each test case contains a string $s$, consisting of lowercase Latin letters.

It is guaranteed that the sum of lengths of $s$ over all test cases does not exceed $10^6$.

Output data

For each test case, if there is no such way to rearrange characters of $s$, print NO.

Otherwise, print YES. On the next line output a single string $t$. It should be the rearrangement of characters of $s$, and it should satisfy the condition from the statement.

You can print YES and NO in any case (e.g. the strings yEs, yes, Yes will be taken as a positive answer).

Example

stdin

5
a
sos
abba
icpc
tenet


stdout

YES
a
YES
oss
NO
YES
icpc
YES
tente