Under construction

Still being built. Things may change

Message Decowding

Time limit1sMemory limit1024 MB

Summary
Decode a message by mapping each letter through a 26-character substitution key, keeping case and spaces.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

The cows have just learned about encryption and think they can use secret messages to plan meetings with cows on other farms.

Cows are not known for their intelligence. Their encryption is nothing like DES or BlowFish. They use a simple substitution cipher.

The cows have a decryption key and a secret message. Help them decode it. The key looks like this:

yrwhsoujgcxqbativndfezmlpk

An 'a' in the secret message really means 'y', a 'b' really means 'r', a 'c' decrypts to 'w', and so on. Blanks are not encrypted and stay in place.

Input text can be upper or lower case. Both decrypt with the same key, and the case is kept.

Input

Line 1 holds the 26 lowercase characters of the decryption key.

Line 2 holds the message to decode. It is up to 80 characters long.

Output

A single line with the decoded message. It has the same length as the second line of input.

Examples1

  1. Example 1

    Input
    eydbkmiqugjxlvtzpnwohracsf
    Kifq oua zarxa suar bti yaagrj fa xtfgrj
    
    Expected output
    Jump the fence when you seeing me coming