| IPL 2026 |
|---|
| Finished |
Yuuki is writing a problem and is coming up with the colors to use in the example.
Unfortunately, he wants to refer to each color with a one-character string corresponding to its first letter. This means he cannot use two colors that share the same first letter.
Given a list of $$$n$$$ color suggestions (one word, all uppercase letters), count the maximum number of colors he can use in the problem.
The first line contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$) — the number of color suggestions.
Each of the next $$$n$$$ lines contains a single string $$$s_i$$$ consisting of uppercase Latin letters ($$$1 \le |s_i| \le 20$$$) — a color suggestion.
Print a single integer — the maximum number of colors Yuuki can use.
5REDBLUEGREENROSEBLACK
3
6LIMEGREENLEMONYELLOWLILACLIGHTBLUELICORICELAVENDAR
1
In the first testcase, Yuuki can choose the colors RED, GREEN, and BLACK which have first letters R G B respectively. It can be shown that Yuuki cannot choose more than three colors.
In the second testcase, Yuuki cannot choose more than one color, as any two colors share the same first letter.
| Name |
|---|


