|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||90||77||76||85.393%|
We have had a problem with one of our hard disks and we lost the final score of some football matches. However, we have been able to recover the names of the players that scored and found the members of each team on Wikipedia.
The first line will contain three integers A, B and G representing the number of players in team A and team B and the number of goals scored in the match.
The second line will contain A strings separated by spaces. The names of the players of team A.
The third line will contain B strings separated by spaces. The names of the players of team B.
The fourth line will contain G strings. The names of the players that scored.
There will be at most 20 players in each team and at most 100 goals.
The names of the players are lowercase latin letters and they will have at most 20 characters each.
Print "A" if the team A scored more than team B.
Print "B" if the team B scored more than team A.
Print "TIE" if both scored the same number of goals.
3 3 5 messi neymar suarez ronaldo bale james messi messi messi bale james
4 1 5 jordan pippen oneal bryant villa villa villa villa villa villa
3 3 4 messi neymar suarez ronaldo bale james bale messi ronaldo suarez