#000021

trik

Professor Djuric enjoys performing card tricks. His favorite trick goes like this: the professor puts N cards on the table so that they are arranged facedown in an array (so no one can see which card is it). After that, he asks someone from the audience to point to one of the cards. To the amazement of the audience, the professor guesses which card it is and proves it by flipping the card.


Just a few people know that the professor performs this trick by using a miniature supercomputer located in his golden tooth. Before the start of the performance, he loads data about the deck of cards into the computer (the deck may contain every card an arbitrary number of times). After that, he arranges the cards on the table in the following way. First, he puts down all of the hearts, then spades, then diamonds, and finally clubs. Cards from each suit are solved from the smallest to largest (2 3 4 5 6 7 8 9 10 J K Q A). When an observer points to the card, the professor quickly counts which card from the left is it, and then clenches his jaw a certain number of times to relay this information to the computer. He then quickly receives the information telling him which card has been chosen.


Professor Djuric amused his friends many times with this trick. But, alas! Just before the world tour, the computer software broke down. Your task is to write a new program that will help the professor perform his favorite trick.


InputThe first line of the standard input contains two integers, N (1<=N<=1000000) and K (1<=K<=N) separated with one space. N is the number of cards in the professor's deck and K is the number of the card (counted from the left) which is chosen in the trick. The second line of input contains the cards in the deck separated with one space between them. Every card is written in the following way. There is a letter which marks the suit of the card. "S" is for hearts, "L" for spades, "K" for diamonds and "D" for clubs. After that, without a space as a separator, there is the value of the card. The values are "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A". For your convenience, after the last card there is one more space in the input.

OutputTo the standard output write the card that the observer pointed out. You should write the card in the same manner that is used for the input, but without any spaces (write the suit first and then the value of the card).

Input:
8 5
L6 K10 SQ KA D6 S2 SQ KK

Output:
K10
Explanation: Professor Djuric sorted the cards this way: S2 SQ SQ L6 K10 KK KA D6. In this arrangement, the fifth card from the left is K10.

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.