
Aadil has been provided with a sentence in the form of a string as a function parameter. The task is to implement a function so as to print the sentence such that each word in the sentence is reversed.
Example:Input Sentence: "Hello, I am Aadil!"
The expected output will print, ",olleH I ma !lidaA".
The first and only line of input contains a string without any leading and trailing spaces. The input string represents the sentence given to Aadil.
Output Format:
The only line of output prints the sentence(string) such that each word in the sentence is reversed.
0 <= N <= 10^6
Where N is the length of the input string.
Time Limit: 1 second
Welcome to Coding Ninjas
emocleW ot gnidoC sajniN
Always indent your code
syawlA tnedni ruoy edoc