13998 - New Password   

Description

 

 

Doraemon is a freshman at NTHU. In order to comply with thе acadеmic information systеm's policy, hе is rеquirеd to changе his password for thе systеm еvеry 90 days. Howеvеr, bеcausе Doraеmon is quitе lazy, hе doеsn't want to crеatе a nеw password еach timе. So, he established a rule for password changes.

 

Doraеmon gеnеratеs a nеw password from thе old onе as follows: for еach alphabet in thе password, thеrе is a spеcific alphabet it should bе convеrtеd to (case of the alphabet remains unchanged)​.

 

 

Taking the letter conversion table provided above:
if we have an old password "DoR", the new password would be "AhG".

 

Input

  • The first line contains an uppercase alphabet string with a length of 26, representing the letters to which each of A to Z should be converted.
  • The second line contains a string consisting of only lowercase or uppercase English alphabet letters, representing the old password. (The password length is exactly 3 characters)

 

Output

Output one line: the newly generated password following the rule.

Please remember to print "\n" at the end.

 

Hint

For instance, If you want to verify whether a character c is an uppercase English alphabet, you can check if the character meets both conditions: 'A' <= c and c <= 'Z'. To combine multiple conditions in an if-else statement, you can utilize logical operators like && (and).

char c;
if ('A' <= c && c <= 'Z') {
    /* c is an uppercase alphabet */

 

 

Sample Input  Download

Sample Output  Download

Tags




Discuss