Wibowo and his girlfriend are playing with a deck of cards. A deck consists of different cards. Each card has a number (from lowest to highest: , , , , , , , , , Jack, Queen, King, Ace) and a suit (from weakest to strongest: Diamond, Club, Heart, Spade). When two cards are compared, the one with higher number is considered the winner. If they have the same number then the stronger suit will win.
First, Wibowo and his girlfriend split the deck so each one get cards. The game consists of rounds. In each round, both Wibowo and his girlfriend pick one card from their hand at the same time and compare it. The winner gets one point for that round.
Given the initial hand, Wibowo wondered what is the highest point he could possibly get by playing that hand with his girlfriend.
The first line of input contains an integer (T \leq 100) denoting the number of test cases. Each case is described in a line which contains cards, the Wibowo's hand. Each card has two characters, the first one is number and the second one is suit. The number can be one of , , , , , , , , (), (Jack), (Queen), (King), (Ace). The suit can be one of (Diamond), (Club), (Heart), (Spade). Each card is separated by a single space and all cards are distinct.
For each case, output in a line a single integer the highest point that Wibowo can possibly get by playing that hand.
Example 1