18. Encryption (1)

Time Limit: 2 seconds

Memory Limit: 1024 MB

Rating: 1000

Problem Statement

The FBI has intercepted a weird encrypted message: “Hxd urtn sjii?, H = Y” What does it say?

Input

The first line has a string $S$, the encrypted message made up of lowercase letters and spaces. The next line contains two space-separated characters $A$ and $B$. This means letter $A$ has been shifted to letter $B$ during encryption. These characters may not occur in the actual message.

Output

Output the decrypted version of $S$.

Sample Cases
Sample Input 1:
hxd urtn sjii
h y

Sample Output 1:
you like jazz


Sample Input 2:
aopz pz h yvthu jpwoly
r y

Sample Output 2:
this is a roman cipher
Explanation

Note: In the actual contest you only had to obtain the answer to the input given in the first sample case.

Sources

KL Coding Cup 2022 > Problem 6 > Developmental League

Submit | Back