题目描述
Gajodhar is travelling from one city to another city. Let starting city be the source and city at which his journey ends be destination. There are many intermediate cities between source and destination. Gajodhar has weak memory, so he remembers names of cities by their first character. If there are more than one intermediate cities with same first character, then he can't memorize name of those cities. So your task is to find how many cities can he remember during his journey?
Input
The first line of the input contains the number of test cases t.
The Second line of the input contains the number of intermediate cities n.
The next n lines contain names of intermediate cities. (all the names of cities are in Upper Case).
Output
For each test case print in newline the total number of cities Gajodhar can remember.
Constraints
1 ≤ t ≤ 10
1 ≤ n ≤ 10^3
SAMPLE INPUT
2
3
CHANDIGARH
MUMBAI
CHENNAI
4
KASHMIR
DELHI
BANGLORE
KANYAKUMARI
SAMPLE OUTPUT
1
2
输入格式
见题面
输出格式
见题面