Problem A: Rubik’s Cube

Problem A: Rubik’s Cube

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 629  Solved: 363
[Submit][Status][Web Board]

Description

On the original classic Rubik’s Cube, each of the six faces was covered by nine stickers. Each face has its own colour, which is determined by the central sticker, since that the positions of all six central stickers will never be changed. 

Now, given a face of Rubik’s Cube, try to find out the colour of it.

Input

The first line of input is the number of test cases T (1 <= T <= 100)
For each test case, there are three lines, each line will only contain three upper case English letters, separated by a single blank, which shows the colour of stickers.

Output

For each test case, print only one upper case English letter to show the color of the face.

Sample Input

2
A B C
D E F
A B C

Z Z Z
Z Z Z
Z Z Z

Sample Output

E
Z

HINT

[Submit][Status]