#B. Keyboard Layouts

    Type: RemoteJudge 1000ms 256MiB

Keyboard Layouts

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Keyboard Layouts

题面翻译

给你26个字母的映射(均为小写),再给你一串长度不大于1000的字符串,要你输出它的映射结果。 (其他符号如数字保持不变)

题目描述

There are two popular keyboard layouts in Berland, they differ only in letters positions. All the other keys are the same. In Berland they use alphabet with 26 26 letters which coincides with English alphabet.

You are given two strings consisting of 26 26 distinct letters each: all keys of the first and the second layouts in the same order.

You are also given some text consisting of small and capital English letters and digits. It is known that it was typed in the first layout, but the writer intended to type it in the second layout. Print the text if the same keys were pressed in the second layout.

Since all keys but letters are the same in both layouts, the capitalization of the letters should remain the same, as well as all other characters.

输入格式

The first line contains a string of length 26 26 consisting of distinct lowercase English letters. This is the first layout.

The second line contains a string of length 26 26 consisting of distinct lowercase English letters. This is the second layout.

The third line contains a non-empty string s s consisting of lowercase and uppercase English letters and digits. This is the text typed in the first layout. The length of s s does not exceed 1000 1000 .

输出格式

Print the text if the same keys were pressed in the second layout.

样例 #1

样例输入 #1

qwertyuiopasdfghjklzxcvbnm
veamhjsgqocnrbfxdtwkylupzi
TwccpQZAvb2017

样例输出 #1

HelloVKCup2017

样例 #2

样例输入 #2

mnbvcxzlkjhgfdsapoiuytrewq
asdfghjklqwertyuiopzxcvbnm
7abaCABAABAcaba7

样例输出 #2

7uduGUDUUDUgudu7

20230225-字符串的应用-随堂测验

Not Attended
Status
Done
Rule
Ledo
Problem
6
Start at
2023-2-25 10:30
End at
2023-2-25 11:30
Duration
1 hour(s)
Host
Partic.
34