#K33477. Reverse Sentence Order
Reverse Sentence Order
Reverse Sentence Order
Given a sentence ending with a period, reverse the order of its words while preserving the ending period. The input consists of a single line from standard input representing the sentence. It is guaranteed that each sentence ends with a period and words are separated by a single space. Formally, if the sentence contains words , then the output should be with a period at the end.
inputFormat
A single line from standard input containing a sentence. The sentence guaranteed ends with a period, and words are separated by single spaces.
outputFormat
Output the sentence with the order of words reversed but preserving the ending period. The output should be printed to standard output.## sample
hello.
hello.