Remove extra spaces
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 55%