Mishra, Powale , Ashu and Pk are 4 very genious card players in BH I.
In playing cards there are 4 suits having 13 cards each Ace(A), King(K), Queen(Q), Jack(J), 10, 9, 8, 7, 6, 5, 4, 3 and 2, where A,K,Q,J are face cards.
The four suits are Clubs(C), Spades(S), Hearts(H), Diamonds(D).
Everyone is very superstitious about the kind of card they receive after shuffling. So Coordinator Ashu Sir decided to make a rule that the game will be discontinued i.e. a player can throw the cards if he receives maximum of one face card.
Given the final shuffled stack of card, print "-1" if no one can throw the card or the name of the player who can throw the card. If more than 1 player can throw the cards then print the one whose name is lexicographically smallest.
It is given that the distribution is always done as follows : Ashu first, Mishra next, Powale next, Pk next, Ashu next.....and so on.
Input :
52 lines containing 2 strings separated by space each. First string denotes the suit C,S,H or D. Second string denotes the cards A,K,Q,J,10,9,8,7,6,5,4,3 or 2.
Output :
Name of the player throwing card(Lexicographically smallest if more than 1) or "-1".