АВТ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

60. Drop Spaces

Time Limit: 1 seconds
Memory Limit:64000KB
Points:2
View Problem Statistics Submit Problem added Administrator

В заданной строке английского текста (количество символов в строке не больше 80) удалить лишние пробелы. Слово, здесь – это последовательность латинских букв. Слова могут разделяться пробелами и специальными символами : ; , . ! ? Лишними назовем пробелы в начале и в конце строки, а также лишние пробелы между словами (между словами оставить только по одному пробелу) и пробелы между словом и последующим за ним символом.

Input

Одна единственная строка с текстом на английском языке.

Output

Та же строка, но в преобразованном виде.

Sample

Input:     This is the example string.   Read ,   it   ::  carefully!!!   
Output : This is the example string. Read, it:: carefully!!!

View Problem Statistics Submit Author/source:
Educational Courses / Programming and Basics of Algorithmization / Others /
61. Compute, please 60. 62. Drop the Word 55. Marks 913. Numbers with different digits
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 1.95 sec.
© Copyright VSTU, AVT, Nosov D.A.