UVa 865 - Substitution Cypher

Summary
Given a string which provides plaintext characters and another string which provides substitution characters, apply these substitutions to several lines of text.

Explanation
For each character in the several lines of text, check if the character is in the plaintext string. If it is, replace the character with the corresponding substitution character; otherwise, keep the original character.

Gotchas
It turns out that the term "plaintext letters" means any printable character, such as '.', '%', or even ' ' (a blank space). This means that when reading the first two strings (called plaintext letters and substitution letters), you should use a function which can read an entire line. In C/C++, you can use gets, fgets or getline.

Input
1

abc,-= y89 1234567890 This is a test.,-=

Output
1234567890 abc,-= y89 This7is717test.456