Given a string S(consisting of uppercase/lowercase alphabets only), change the string s according to the rules provided below:
NOTE: If the required string is null print "-1".
INPUT: The first line consists of an integer T i.e. the number of test cases. First and the last line of each test case consists of an string S.
OUTPUT: Print the required string after conversion.
1<=|Length of string|<=105
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.