407140: GYM102697 111 Word Subsitution
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
111. Word Subsitutiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
In this question you must encrypt or decrypt a message by replacing a key letter with a word or a key word with a letter. If the message contains the key word then you should be decrypting and replacing the key word with the key letter. If the message given does not contain the key word then you should be encrypting and should be replacing the key letter with the key word. The key letter will not be within the key word.
InputThe first line will be the text you are encrypting or decrypting. The second line will be the key letter and the third line will be the key word.
OutputPrint the encrypted or decrypted text
ExamplesInputhello world l bruhOutput
hebruhbruho worbruhdInput
hebruhbruho worbruhd l bruhOutput
hello world