#K6446. Generate Special Number Sequence

    ID: 31980 Type: Default 1000ms 256MiB

Generate Special Number Sequence

Generate Special Number Sequence

You are given several test cases. For each test case, you are provided with a sequence of integers. Your task is to construct a special number sequence from this list by following the rule:

For every integer \( n \) in the sequence, if \( n \) is even, append \( n \) (in its string form) to the result. If \( n \) is odd, append the character X instead.

The final result for each test case is the concatenation of the characters and numbers, in the same order as in the input. Each test case's result should be printed on a new line.

Mathematical Representation:

For each number \( n \):

\[ f(n)=\begin{cases} n & \text{if } n \bmod 2=0,\\ X & \text{if } n \bmod 2=1.\end{cases} \]

inputFormat

The first line contains an integer (t) denoting the number of test cases. For each test case, the input consists of two lines. The first line contains an integer (n) indicating the number of elements in the sequence. The second line contains (n) space-separated integers.

outputFormat

For each test case, output the special number sequence generated by replacing every odd number with 'X' and concatenating even numbers as they are. Each test case output should be on a separate line.## sample

3
4
1 2 3 4
5
5 6 7 8 9
3
11 22 33
X2X4

X6X8X X22X

</p>