E. Card Grouping
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

While bored on a trip, you've invented a single-player card game to pass the time. You start by laying out $$$N$$$ cards chosen at random from a deck: to keep the game simple, you've removed the face cards from the card deck, so that every card has a rank from $$$1$$$ to $$$10$$$, and a suit (clubs, diamonds, hearts, or spades).

You then try to group as many cards as possible into pairs. Two cards can be paired if they have the same suit or the same rank. (Once two cards have been paired, they cannot be used again to form any additional pairs.)

What's the maximum number of pairs you can form using the given cards, if you play the game optimally?

Input

The first line of input contains a single integer $$$N$$$ ($$$1 \leq N \leq 40$$$), the number of cards you've drawn from the deck.

Each of the next $$$N$$$ lines describes one of the cards and consists of a rank (an integer between 1 and 10 inclusive) followed by a single upper-case letter C, D, H, or S, indicating a suit of clubs, diamonds, hearts, or spades, respectively.

No two cards will have the same rank and suit.

Output

Print the maximum number of pairs that can be formed from the given cards.

Examples
Input
5
2C
7C
10H
7S
5C
Output
2
Input
4
2C
3D
4H
5S
Output
0