


An empty string is also magical.
The first line contains a single integer ‘T’ representing the number of test cases.
The next ‘T’ lines contain a string ‘S’ given by Haibara.
For each test case, print the magical string ‘S’ by removing the minimum number of characters.
Output for every test case will be printed in a separate line.
You don’t need to print anything; It has already been taken care of.
1 <= T <= 50
1 <= |S| <= 100
Where ‘T’ is the number of test cases and |S| is the length of the string ‘S.’
Time limit: 1 sec
We will push the first char of the string in a stack and check if the topmost element in the stack and the next element of the string has a difference of 32. Then we will pop the last element from the stack and move to the next element of the string ‘S’. Otherwise, if the difference is not 32 which means that they are not same characters so we will push that element of the string in the stack.