Given a string S, the task is to change the string according to the condition; If the first letter in a string is capital letter then change the full string to capital letters, else change the full string to small letters.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains a string S.
For each test case, print the changed string in a new line.
1<=T<=200
1<=|string length|<=10000
4
geEkS
FoR
sMMMMMMMMnnnnMMMNnnMMMNnnnMMM
MssssssssssssssssssssssssssssssssssssssNNmmss
geeks
FOR
smmmmmmmmnnnnmmmnnnmmmnnnnmmm
MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSNNMMSSS