Lowercase or Uppercase
You are given a string S consisting of lowercase English letters (a, b, c ….. z), uppercase English letters (A, B, C … Z) and digits (0, 1, 2 …. 9). You are allowed to change any element in any position of S with lowercase or uppercase English letters.
Now you have to find minimum number of changes in string S so that string S contains only lowercase or contains only uppercase English letters.
First line of input contains the number of test cases T (1<= T <= 100). Next T lines describe the case. Each case contains a string S (1 <= |s| <= 10000).
For each test case, output a single line contains “Case X: Y” without any quote where X denotes the number of test cases and Y denotes the answer of the problem.
4 AAA aaab aaBa aBaB
Case 1: 0 Case 2: 0 Case 3: 1 Case 4: 2