11742 - An eye for an eye   

Description

Difficulty: ★☆☆☆☆

A upper case letter can be eliminated with a correspoding lower case letter.

For instance, a 'Q' can be eliminated with a 'q'.

 

Your output should be the number(length) of remaining letters.

If the input string is 'bbAABBBaaaC', the remaining letter would be 'BaC'.

Hence the output is 3.

Input

First N(N<=10)represents the number of the testcase.
Follow by N lines strings.
The length should not exceed 100.
Strings contain letters only, which means digits excluded.

Output

The numbers(length) of the remaining string.

Sample Input  Download

Sample Output  Download

Tags




Discuss