Password Pat -------- --- Password Pat is known for making slick passwords such as @hwl2rt&tk which is derived from the sentence At Hogwarts we love to roast tyrants and tea kettles. by applying the following rules while reading the sentence: (1) On reading a non-special word, output its first letter in lower case. (2) The special words and the single character to output are: and & zero 0 or | one 1 not ! two 2 equal = three 3 plus + four 4 minus - five 5 times * six 6 slash / seven 7 dollar $ eight 8 percent % nine 9 at @ to 2 for 4 ate 8 Note these words are recognized even if some of their letters are capitals. (3) On reading space characters, output nothing. (4) On reading punctuation, output the punctuation, except on reading a period output nothing. (5) Numbers are not permitted in the sentence (unless spelled out as words). Pat does not limit herself to a single input sentence. For example, the input fairly! squarely! I won? produces the password: f!s!iw? You are to write a program that will apply Pat's rules to sentences to derive a password. Input ----- Lines each of which contains one or more sentences. Words on the line are sequences of consecutive letters. All input characters are letters, spaces, or one of the punctuation characters .!?, . No line is longer than 80 characters. Input ends with an end of file. Output ------ One line containing a password for each input line. The password on a line must be that derived by applying Pat's rules to the sentences in the corresponding input line. There are no spaces or tabs in any output line. Sample Input ------ ----- At Hogwarts we love to roast tyrants and tea kettles. fairly! squarely! I won? Slash and burn politics is for the minus birds. I want to replace foobar with fee, fie, foe, fum! Sample Output ------ ------ @hwl2rt&tk f!s!iw? /&bpi4t-b iw2rfwf,f,f,f! File: passwords.txt Author: Bob Walton Date: Thu Oct 21 05:17:36 EDT 2004 The authors have placed this file in the public domain; they make no warranty and accept no liability for this file. RCS Info (may not be true date or author): $Author: walton $ $Date: 2004/10/21 09:30:47 $ $RCSfile: passwords.txt,v $ $Revision: 1.8 $