Legal Hand
Match a well-formed hand: exactly five cards, single space separated, each a rank from A23456789TJQK followed by a suit from SHDC — and no card appearing twice. Hands are always sorted by rank, ascending.
The shape is the easy half. The interesting half is that one deck holds one seven of hearts: no card may repeat. The trap is assuming sorted order puts a repeat next to its twin. It does not — the hand is sorted by RANK, and the suits inside a rank block are in no order at all, so the ten of spades can appear twice with another ten sitting between them. A repeat has to be forbidden anywhere later in the hand, not just in the next position, which means stepping over whole cards to look for it.
AS 2H 5D 9C KSmust match2S 2H 2D 2C 5Smust matchfour of a kind is four different cards
AS 2H 5D 9Cmust not matchonly four cards
AS 2H 5D 9C 1Smust not match1 is not a rank
AS 2H 5D 9C KXmust not matchX is not a suit
7H 7H 8D 9C KSmust not matchthe seven of hearts twice
AH TS TH TS TDmust not matchthe ten of spades twice, with another ten between them
+ 9 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.