Problem A: Interesting number Problem A: Interesting number
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 815 Solved: 436
[Submit][Status][Web Board]Description
You are given \( n (n \ge 3) \) numbers. Lanran thinks that the third largest number is interesting, but lanran does not like multiple numbers with the same value. If there are more than one numbers equal to the third largest number, please output 'wa' (without quotes), otherwise please print it out.
Input
There are multiple testcases.
The first line of the input contains a single integer \( T ( 1\le T \le 10) \), indicates the number of the testcases.
Then T testcases follow:
For each testcase, the first line contains a single integer \( n ( 3\le n\le 100 ) \).
The second line contains n integers \( a_{1},a_{2},...,a_{n}(0\le a_{i}\le100) \), separated by a space.
Output
Output T integers for the answers of T testcases.
Sample Input
7
3
1 1 1
4
2 3 3 3
5
1 2 3 4 2
3
3 1 2
4
4 9 13 13
5
20 1 20 1 9
10
6 7 8 9 10 1 2 3 4 5
Sample Output
wa
wa
wa
1
9
9
8
HINT
[Submit][Status]