DECODE

Time limit1sMemory limit128 MB

Problem

A text can be encrypted by replacing each of its letters with another letter. To do this we use a replacement table built as follows.

Choose a word made up of distinct letters of the English alphabet — the key word. Choose an integer K not greater than 26 — the key number. The replacement table has two rows and 26 columns.

The upper row contains all 26 letters of the English alphabet in sorted order. The key word is written letter by letter, from left to right, in the lower row, starting at the Kth position. After the last letter of the key word has been written, the remaining letters (those that do not appear in the key word) are written next, in lexicographic order. Once a letter is written in the last (26th) position of the lower row, the remaining letters continue from the first position.

For example, if the key word is DUBROVNIK and the key number is 10, the replacement table is built as follows.

A text is encrypted by finding each letter in the upper row and replacing it with the letter written below it.

Write a program that, using the given key word and key number, decodes the given coded text, i.e. recovers the original text.

Input

The first line contains the key word, consisting of capital letters of the English alphabet (A–Z). The length of the key word is at most 26.

The second line contains the key number K (1 ≤ K ≤ 26).

The third line contains the coded text, consisting of capital letters of the English alphabet (A–Z). The length of the coded text is at most 100.

Output

Print the decoded original text on a single line.