{"raw_statement":[{"iden":"statement","content":"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.\n\nThe 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.\n\nPrint the encrypted or decrypted text\n\n"},{"iden":"input","content":"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."},{"iden":"output","content":"Print the encrypted or decrypted text"},{"iden":"examples","content":"Inputhello world\nl\nbruh\nOutputhebruhbruho worbruhd\nInputhebruhbruho worbruhd\nl\nbruh\nOutputhello world\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ M $ be the input message (string).  \nLet $ c \\in \\Sigma $ be the key letter (single character).  \nLet $ w \\in \\Sigma^* $ be the key word (string), with $ c \\notin w $.  \n\n**Constraints**  \n- $ c $ is a single character.  \n- $ w $ is a non-empty string not containing $ c $.  \n\n**Objective**  \nIf $ w \\subseteq M $ (i.e., $ w $ is a substring of $ M $):  \n  Decrypt: replace every occurrence of $ w $ in $ M $ with $ c $.  \n\nElse:  \n  Encrypt: replace every occurrence of $ c $ in $ M $ with $ w $.  \n\nOutput the resulting string.","simple_statement":"Replace the key letter with the key word if the message doesn’t contain the key word.  \nReplace the key word with the key letter if the message contains the key word.  \nPrint the result.","has_page_source":false}