"Omaha" is a variation of poker in which half of the pot goes to the player(s) with the lowest hand. The game is played with a deck of cards, each with a value between 1 through 13, inclusive. Each player is dealt 4 cards, and then 5 shared cards are dealt face up in the center of the table. Each player makes their lowest possible five-card hand by selecting exactly two of their own cards and exactly three of the shared cards.
In order for a hand to qualify, all five cards must have a value of 8 or lower, and all five cards must have different values. If a player cannot form such a hand, he/she is not eligible to win this half of the pot.
Two low hands are compared by sorting the cards from highest to lowest. Starting from the highest card in each hand, compare corresponding cards in each hand until you find the first two with different values. The hand with the smaller of these two cards is the lower hand, and therefore the winner.
For example, "76521" is lower than "86432", because 7 is less than 8. "75421" is lower than "75431" because 2 is less than 3.
If both hands have the same five cards, they get an equal share of this half of the pot.
You will be given the five shared cards, and the 4 cards held by one player.
The cards will be given as Strings, with each character in each String representing one card.
Characters '1' through '9' represent cards of values 1 through 9, 'T' is 10, 'J' is 11, 'Q' is 12, and 'K' is 13.
Return a String of 5 characters, representing the 5 cards in this player's lowest hand (as defined above).
The cards should be sorted highest to lowest. If the player does not have a qualifying low hand, return an empty String.
NOTE: Ignore anything else you may know about cards and card games. For example, suits are not used to determine low hands, and are not considered in this problem. The cards of value 1 are also known as "aces", but we'll just call them '1' for this problem. Also, a standard deck of cards has 4 cards of each value, but this will not be enforced in the input.