Problems
Remove extra spaces
Remove extra spaces
Given a string. Write a program that will remove all extra spaces from this string. A space will be considered redundant if:
- it is located at the beginning of the line, before the first word;
- it is located at the end of the line, after the last word;
- some spaces are located between words (more simply, if words are separated by more than one space, then all but one space are superfluous).
Input
One string s (0 ≤ |s| ≤ 255) that contains Latin letters and spaces only.
Output
Print the string without extra spaces.
Input example #1
Alexandr Sergeevich Pushkin
Output example #1
Alexandr Sergeevich Pushkin