You are given a string containing characters and only, your task is to change it into a string such that every two consecutive characters are different. To do this, you are allowed to delete one or more characters in the string.
Your task is to find the minimum number of required deletions.
For example, string should be changed to by deleting one character .
The first line contains an integer , i.e. the number of test cases.
The next lines contain a string .
For each test case, print the minimum number of deletions required in a new line.
The characters marked red are the ones that need to be deleted so that the string doesn't have two same consecutive characters.