Periods
Time limit1sMemory limit1024 MB
Each input line is a sentence, and the task adds a period to any line that lacks one.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
Eric gets distracted, so sometimes he forgets to put periods at the end of his sentences. To help him, put a period at the end of each sentence that does not already have one.
Input
The first line contains a single integer n, the number of lines that follow. Each of the next n lines contains one sentence, which may or may not end with a period.
Output
Output each sentence so that it ends with exactly one period.