Time Limit: 1000MS
Memory Limit: 30000K
RAILROAD CROSSINGand its krunched version:
RLD CSNGBlanks are krunched differently. Blanks are removed so that a krunched phrase has no blanks on its beginning or end, never has two blanks in a row, and has no blanks before punctuation. Otherwise, blanks not removed. If we represent blanks by "_",
MD_SYwhere the single remaining blank is shown by "_". Write a program that reads a line of input (whose length ranges from 2 to 70 characters), and krunches it. Put the krunched word or phrase in the output file. The input line has only capital letters, blanks, and the standard punctuation marks: period, comma, and question mark.