#C2025. Parrot Repeats
Parrot Repeats
Parrot Repeats
You are given a sentence that ends with a full stop (.). Your task is to output the original sentence followed by a space and then the last word repeated twice. The repeated words should be separated by a single space.
For example, given the input: I love programming.
, the output should be: I love programming. programming programming
.
Note: Ensure to handle the input via stdin and print your result to stdout.
inputFormat
The input consists of a single line containing a sentence ending with a full stop (.).
outputFormat
The output should be the original sentence (preserving everything before the final full stop) followed by a period, a space, and then the last word repeated twice with a space separating them. Formally, if the input sentence is given by \( S. \) and the last word of \( S \) is \( w \), then the output should be:
[ S., w, w ]
Make sure to produce the output to stdout.
## sampleHello.
Hello. Hello Hello