- Time limit: 1.00 s
- Memory limit: 256 MB
There are numbers written on a blackboard. Exactly one of the numbers is interesting because it is both prime and palindrome. Can you find it?
Input
The first input line contains an integer : the number of test cases.
Each test case consists of two lines. The first line contains an integer : the amount of numbers. The second line contains numbers on the blackboard.
Output
For each test case, output the interesting number.
Constraints
- each number is between and
- the sum of all values is at most
Example
Input:
3 5 12 8 11 14 19 3 6 7 8 4 44 85 100 131
Output:
11 7 131