"Hit or Miss" (also known as "Frustration", "Harvest", "Roll-Call", "Talkative", and "Treize") is a very simple solitaire card game, played as follows. Take a standard deck of 52 cards — four copies each of the values 1 through 13 (suits do not matter in this game) — shuffle it, and count through the deck as $1, 2, 3, \dots$, restarting at $1$ after $13$. Each time you count, look at the top card of the deck and do one of two things:
You win if you eventually remove every card from the deck (which may take a very long time).
The game generalizes to two or more players. The first player begins with all 52 cards; every other player starts with no cards. Whenever a player would discard (matches) a card, instead of discarding it she passes it to the next player, who then plays the same game starting from count $1$. The last player truly discards each matched card rather than passing it back to the first player.
All players who currently hold cards act in lockstep, repeating the following two-step cycle:
The cycle repeats until either the game is won (the last player discards the final card) or an unwinnable position is reached. A player's count advances by $1$ after each value is said, wrapping from $13$ back to $1$. If a player runs out of cards, that player pauses and waits until a card is passed to them, then resumes counting from where they left off. For example, if a player passes their last card on a count of $7$, they wait until they receive a card and resume with count $8$ at the start of the next cycle.
The first line contains a single positive integer $n$: the number of games to process. Each of the next $n$ lines describes one game and contains $53$ integers. The first integer is the number of players, in the range $1$ to $10$; the remaining $52$ integers are the initial deck listed from the top card to the bottom card. Every card value is in the range $1$ to $13$.
For each game, output one line. The line begins with Case x:, where $x$ is the game number starting from $1$, followed by a single space and then one of the following. If the game can never be completed, output unwinnable. Otherwise, output the value of the last card discarded by each player (the last card that player removed from their own hand — passed onward, or truly discarded for the last player), in player order. All values on the line are separated by single spaces.