Kshitij and Abhishek are best friends. Kshitij changed Abhishek's all accounts password and gave him a string s created by a cipher algorithm. Being good at bit algorithm, he XORed the hexadecimal string, N number of times, where N is the string length and every XOR operation is done after shifting the consecutive string to the right.
For example : String="abcd".
Abhishek finds it difficult in understanding how it is done. But you are now clever enough to find out the original password, so help him.
The first line contains an integer T, the number of test cases. For each test case, there is a hexadecimal string s.
For each test case, the output is a string containing the original password.
1<=N<=1001 & N%2=1
Note: Alphabets are in uppercase.
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.