Encrypted Message

0

0 votes
String Algorithms, Medium
Problem

X and Y are great friends. Y has a boyfriend Z and X has a crush on him. Since Z is a cryptographer, he likes sending encrypted messages to Y with a key to unlock it obviously :P. Now Z being a wee bit jealous wants to figure out the text messages that are being sent to her mobile. On the pretext of making a call, she brings her phone to you since you are a CS guy. To help her you need to decrypt the text message and get the actual message.
X has 3 hours till Y asks for her phone back.
There are few things that is known to you already.

  1. Z uses Classical Cryptography techniques to encrypt the message.
  2. The key is hidden in the encrypted text. You have to figure out what it is.

Input Format
The first line has the encrypted text. Note input is only characters from A-Z and space all in capitals

Output Format
The output is the plain text formed after decryption. Print it without any extra spaces or text other than the actual answer.


EXTRA SAMPLE TEST CASE

 1.Input:

ESTMANI TEVILAA SAFEHTM

Output:

IAMTHEFASTESTMANALIVE

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?