Convert a given string to its cross string (i.e Diagonal from left-right and from right-left).
The first line of input contains a single integer T denoting the number of test cases. Then T test cases follow. Each test case consist of two lines. The first line of each test case consists of a String in lower case.
Print given string(in lower case) in cross manner.
1 ≤ T ≤ 100
1 ≤ length of string ≤ 50
g s e k e e k g s
g s e k e e k e s g f r o f r s g k e e e e k g s
For the 1st test case where string is geeks
G S E K E E K G S
The above is the proper cross manner for the test case, but when printed in a single line it becomes as shown in the output.
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.