#UnknownID16. JIXMPII57IFY100#*':
JIXMPII57IFY100#*':
Statement
For a string , let be the number of distinct non-empty substrings of .
Shohag has a string . Help him find a non-empty string such that is a substring of and is even or state that no such string exists.
A string is a substring of a string if can be obtained from by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end.
Format
Input
The first line contains a single integer ( ) — the number of test cases.
The first and only line of each test case contains a string ( ) consisting of lowercase English letters.
It is guaranteed that the sum of the length of over all test cases doesn't exceed .
Output
For each test case, print a non-empty string that satisfies the conditions mentioned in the statement, or if no such string exists. If there are multiple solutions, output any.
Sample
5
dcabaac
a
youknowwho
codeforces
bangladesh
abaa
-1
youknowwho
eforce
bang
相关
在下列比赛中: