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 letters which coincides with English alphabet.

You are given two strings consisting of 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.


-----Input-----

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

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

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


-----Output-----

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


-----Examples-----
Input
qwertyuiopasdfghjklzxcvbnm
veamhjsgqocnrbfxdtwkylupzi
TwccpQZAvb2017

Output
HelloVKCup2017

Input
mnbvcxzlkjhgfdsapoiuytrewq
asdfghjklqwertyuiopzxcvbnm
7abaCABAABAcaba7

Output
7uduGUDUUDUgudu7

Difficulty: interview

Starter code:

Solutions:
s1 = input()
s2 = input()
s = input()
r=''
for i in s:
    if i.isalpha():
        #print (s1.index(i.lower()))
        if i.isupper():
            r+= (s2[(s1.index(i.lower()))].upper())
        else:
            r+=(s2[(s1.index(i.lower()))])
    else:
        r+=(i)
print (r)

a = input()
b = input()
s = list(input())
for i in range(len(s)):
    e = s[i]
    if 'A' <= e <= 'Z':
        bad = True
        e = chr(ord(e) - ord('A') + ord('a'))
    elif 'a' <= e <= 'z':
        bad = False
    else:
        continue
    e = b[a.index(e)]
    if bad:
        e =  chr(ord(e) - ord('a') + ord('A'))
    s[i] = e
print(''.join(s))

a = input()
b = input()
d = {}
for i in range(26):
    d[a[i]] = b[i]
    d[a[i].upper()] = b[i].upper()
s = input()
print(''.join([d[i] if i in d else i for i in s]))


read = lambda: map(int, input().split())
a = input()
b = input()
low = lambda c: chr(ord(c) + ord('a') - ord('A'))
hig = lambda c: chr(ord(c) - ord('a') + ord('A'))
ish = lambda c: ord('A') <= ord(c) <= ord('Z')
f = lambda c: b[a.index(c)]
s = input()
ans = [''] * len(s)
for i in range(len(s)):
    c = s[i]
    if ord('0') <= ord(c) <= ord('9'):
        ans[i] = c
        continue
    if ish(c):
        ans[i] = hig(f(low(c)))
    else: ans[i] = f(c)
print(''.join(ans))

a = input()
b = input()
A = a.upper()
B = b.upper()

d = dict(zip(list(a + A), list(b + B)))

s = list(input())

ans = list(map(lambda x : d[x] if x in d else x, s))

print(''.join(ans))

s1 = input()
s2 = input()
s = input()
res = ""
for x in s:
    if 'A' <= x <= 'Z':
        res += s2[s1.index(x.lower())].upper()
    elif 'a' <= x <= 'z':
        res += s2[s1.index(x)]
    else:
        res += x
print(res)


board = dict(zip(input(), input()))
for c in input():
    if c.lower() not in board:
        print(c, end='')
    elif c.isupper():
        print(board[c.lower()].upper(), end='')
    else:
        print(board[c], end='')

s = input()
t = input()

l = {}

for i in range(26):
	l[s[i]] = ord(t[i]) - ord(s[i])

ans = ''

for c in input():
	ans += chr(ord(c) + l.get(c.lower(), 0))

print(ans)

a1 = input()
a2 = input()
t = input()
mapping = dict()
for i in range(26):
    mapping[a1[i]] = a2[i]
    mapping[a1[i].upper()] = a2[i].upper()

ans = ""
for ch in t:
    if ch in mapping:
        ans += mapping[ch]
    else:
        ans += ch
print(ans)


import sys

def main():
    a = sys.stdin.readline().rstrip()
    b = sys.stdin.readline().rstrip()
    c = sys.stdin.readline().rstrip()
    x = {}
    for i in range(len(a)):
        x[a[i]] = b[i]
        x[a[i].upper()] = b[i].upper()

    s = [0]*len(c)

    for i in range(len(c)):
        if c[i] in x:
            s[i] = x[c[i]]
        else:
            s[i] = c[i]

    print("".join(s))

    
main()


s1 = input()
s2 = input()
a = {}
for i in range(len(s1)):
    a[s1[i].lower()] = s2[i].lower()
    a[s1[i].upper()] = s2[i].upper()
ans1 = input()
for i in ans1:
    if i in a:
        print(a[i], end = "")
    else:
        print(i, end = "")


s1 = input()
s2 = input()
t = input()
d = {}
for i in range(len(s1)):
	d[s1[i]] = s2[i]
	d[s1[i].upper()] = s2[i].upper()

for i in range(10):
	d[str(i)] = str(i)

ans = ''
for i in range(len(t)):
	ans += d[t[i]]
print(ans)

first = input()
second = input()
x = input()
y = ''
first += first.upper()
second += second.upper()
for i in range(len(x)):
    if x[i] in first:
        y += second[first.index(x[i])]
    else:
        y += x[i]
print(y)


a, b = input(), input()
d = {}
for n in range(10):
  d[str(n)] = str(n)
for l in range(26):
  d[a[l]] = b[l]
  d[a[l].upper()] = b[l].upper()
s = ""
for x in input():
  s += d[x]
print(s)


a = input()
b = input()

mapping = {}

for I in range(len(a)):
	mapping[a[I]] = b[I]

c = input()

answer = ""

for I in c:
	if I.isupper():
		answer += mapping[I.lower()].upper()
	elif I.islower():
		answer += mapping[I]
	else:
		answer += I
print(answer)

a = input()
b = input()
s = input()

d = dict(zip(a, b))

for c in s:
    if c.lower() in d:
        if c.islower():
            print(d[c], end='')
        else:
            print(d[c.lower()].upper(), end='')
    else:
        print(c, end='')


a,b=input(),input()
dict={}
d=[]
for x in list(input()):
    if x in '0123456789':
        d.append(x)
    elif x == x.lower():
        d.append(b[a.index(x)])
    elif x==x.upper():
        d.append(b[a.index(x.lower())].upper())
print(''.join(d))

s1 = input()
s2 = input()
s1+=s1.upper()
s2+=s2.upper()
d  = {}
for i in range(52):
    d[s1[i]] = s2[i]
s = input()
ans = ""
for i in s:
    if not i.isdigit():
        ans+=d[i]
    else:
        ans+=i
print(ans)

a = [i for i in input()]
for i in range(26):
    a += [chr(ord(a[i]) + ord('A') - ord('a'))]
b = [i for i in input()]
for i in range(26):
    b += [chr(ord(b[i]) + ord('A') - ord('a'))]
d = {a[i]: b[i] for i in range(52)}
s = input()
for i in s:
    if i in d:
        print(d[i], end='')
    else:
        print(i, end='')

a=list(input().strip())
b=list(input().strip())
x=list(input().strip())
m=[]
for i in x:
    if i.isupper():
        i=i.lower()
        for j,k in zip(a,b):
            if j==i:
                m.append(k.upper())
    elif i.islower():
        for j,k in zip(a,b):
            if j==i:
                m.append(k)
    elif i.isdigit():
        m.append(i)
for i in m:
    print(i,end="")

import string
a, b, string = input(), input(), input()
l = len(string)
temp = string.lower().translate(string.maketrans(a, b))
for x in range(l):
    c = string[x]
    if c.lower() != c:
        temp = temp[:x] + temp[x].upper() + temp[x + 1:]
print(temp)

alpha1 = input()
alpha2 = input()
s = input()
n = len(s)
indices = [0 for i in range(26)]
for i in range(26):
    indices[ord(alpha1[i])-ord('a')] = i
for i in range(n):
    if not s[i].isalpha():
        print(s[i], end="")
    else:
        if ord('A') <= ord(s[i]) and ord(s[i]) <= ord('Z'):
            j = ord(s[i]) - ord('A')
            j = indices[j]
            l = alpha2[j]
            l = chr(ord(l) - ord('a') + ord('A'))
            print(l, end="")
        else:
            j = ord(s[i]) - ord('a')
            j = indices[j]
            l = alpha2[j]
            print(l, end="")
print("")


from sys import stdin

s1 = stdin.readline().rstrip()
s2 = stdin.readline().rstrip()
ss = stdin.readline().rstrip()

data = {}
for i in range(0, len(s1)):
    data[s1[i]] = s2[i]
    data[s1[i].upper()] = s2[i].upper()

rs = []
for i in ss:
    rs.append(data[i] if i in data else i)

print(''.join(rs))


d = dict()
tr = dict()
alpha = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz'
for i in range(26):
    tr[alpha[2 * i + 1]] = alpha[2 * i]
r1 = input()
r2 = input()
for s in range(26):
    d[r1[s]] = r2[s]
    d[tr[r1[s]]] = tr[r2[s]]
text = input()
ans = ''
for i in text:
    if i in d.keys():
        ans += d[i]
    else:
        ans += i
print(ans)