Given a number N, remove recurring digits from it. All adjacent same occurrences of a digit should be removed. For example, 111222 should be converted to 12.
The first line of input contains an integer T denoting the number of test cases. T testcases follow. Each testcase contains 1 line of input denoting the number N.
Print the number after removing recurring digits.
1 ≤ T ≤ 30
0 ≤ N < 1018
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.