Problems
After the troubles with printing advertising for IO two years ago, the marketing team of the
conference decided to use an interactive installation. It consists of a matrix of I or an uppercase O. When one of the screens is touched, it switches
the letter it displays to the one it was not displaying right before the touch occurred.
You are looking at one of those installations, and find it to be disorganized. You want to
change some of the letters such that the top I's as the bottom I's in total as the rightmost

For example, in the left picture above, I's in total, while the bottom I's. By touching the two highlighted screens we can change the state to that
shown in the right picture, which shows I's in the top
Given the state of the installation, can you find the minimum number of letter changes needed to achieve your organizational goal?
Input
The first line of the input gives the number of test cases,
Output
For each test case, output one line containing Case #,
where I's in its top and bottom halves, and the same number of letter
I's in its left and right halves.
Example
3
2
IIOO
OOOI
IIII
OOOI
1
IO
OO
2
OIOI
IOIO
OIOI
IOIO
Case #1: 2
Case #2: 1
Case #3: 0