Write a program that takes a compressed file as input and generates a reproduction of the original uncompressed file as output. You can assume that no word contains more than 50 characters and that the original uncompressed file contains no digit characters.
For the purposes of this problem, a word is defined to be a maximal
sequence of upper- and lower-case letters. Words are
case-sensitive--the word abc
is not the same as the word
Abc
. For example,
There is no upper limit on the number of different words in the input file. The end of the input file is signified by the number 0 on a line by itself. The terminating 0 merely indicates the end of the input and should not be part of the output produced by your program.x-ray
contains 2 words:x
andray
Mary's
contains 2 words:Mary
ands
It's a winner
contains 4 words:It
ands
anda
andwinner
Dear Sally, Please, please do it--1 would 4 Mary very, 1 much. And 4 6 8 everything in 5's power to make 14 pay off for you. -- Thank 2 18 18-- 0I really don't think this sample input is correct.
Dear Sally, Please, please do it--1 would 4 Mary very, 1 much. And 4 5 7 everything in 6's power to make 12 pay off for you. -- Thank 2 14 13-- 0
Dear Sally, Please, please do it--it would please Mary very, very much. And Mary would do everything in Mary's power to make it pay off for you. -- Thank you very much--