El has a string S consisting of '0', '1' and '2' as only characters. El is a sorted person, so he does not like randomness, so when he looks at the string and finds that characters in string are in random order, he becomes frustrated. He wants to clean up the string, i.e, he wants all same characters in the string to appear together. In one move El can swap any two characters in the string, i.e, he can select index i, j then swap Si and Sj. Find the minimum number of moves required to clean the string.
Input Format
Output Format
For each test case print only one integer - the minimum no. of moves required.
Constraint
1≤T≤1041≤|S|≤2⋅105Sum of length of strings for all test case does not exceed 2⋅105