Change the string
Submissions: 8314   Accuracy:

41.56%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

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.

Input:
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.

Output:
For each test case, print the changed string in a new line.

Constraints:
1<=T<=200
1<=|string length|<=104

Example:
Input:
2
geEkS
FoR

Output:
geeks
FOR

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arun Tyagi
Author: arun03


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.