#K5981. Reverse Dot Separated Words
Reverse Dot Separated Words
Reverse Dot Separated Words
Given a string in which words are separated by dots, your task is to reverse the order of the words. For example, if the input is i.like.this.program.very.much
, then the output should be much.very.program.this.like.i
.
The string may consist of a single word without any dots, in which case the output remains unchanged. This problem tests your ability to manipulate strings and arrays effectively.
inputFormat
The input consists of a single line containing a string where words are separated by a dot character ('.').
outputFormat
Output a single line with the words in the reversed order. The dots should remain as separators in the output.## sample
i.like.this.program.very.much
much.very.program.this.like.i