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.

Input

The 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.

Output

Print the encrypted or decrypted text

ExamplesInput
hello world
l
bruh
Output
hebruhbruho worbruhd
Input
hebruhbruho worbruhd
l
bruh
Output
hello world

加入题单

上一题 下一题 算法标签: