


If the given string 'STR' = ”I am a student of the third year” so you have to transform this string to ”I Am A Student Of The Third Year"
'STR' will contains only space and alphabets both uppercase and lowercase. The words will be separated by space.
The first line of input contains an integer ‘T’ denoting the number of test cases.
Then, the ‘T’ test cases follow.
The first and only line of each test case contains the string 'STR' that needs to be transformed.
For each test case, print the final string after transformation.
The output of each test case will be printed in a separate line.
You don’t have to print anything; it has already been taken care of. Just implement the given function.
1 <= 'T' <= 10
1 <= |STR| <= 10^5
Where |STR| denotes the length of the string.
Time Limit: 1 sec
The idea is to traverse the String and check for lowercase letters just after space; that is, you will check the letter after space if it is lowercase, then change it to uppercase.
The idea is to traverse the String and check for lowercase letters just after space; that is, you will check the letter after space if it is lowercase, then change it to uppercase by changing the ASCII value.