Problem: 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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
bool IsPowerOfTwo(long long int x) { return (x != 0) && ((x & (x - 1)) == 0); }
long long int poer(long long int a, long long int b) {
  long long int rs = 1;
  while (b > 0) {
    if (b & 1) rs *= a;
    a *= a;
    b /= 2;
  }
  return rs;
}
long long int mod_poer(long long int a, long long int b, long long int mo) {
  long long int rs = 1;
  while (b > 0) {
    if (b & 1) rs = (rs * a) % mo;
    a = (a * a) % mo;
    b /= 2;
  }
  return rs % mo;
}
long long int d, x, y;
void ext_euclid(long long int a, long long int b) {
  if (b == 0) {
    d = a;
    x = 1;
    y = 0;
  } else {
    ext_euclid(b, a % b);
    long long int temp = x;
    x = y;
    y = temp - (a / b) * y;
  }
}
long long int mod_inverse1(long long int a, long long int m) {
  ext_euclid(a, m);
  return (x % m + m) % m;
}
long long int mod_inverse2(long long int a, long long int m) {
  return mod_poer(a, m - 2, m);
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int fact[200005];
void fac() {
  fact[1] = fact[0] = 1;
  for (long long int i = 2; i <= 200005; ++i) {
    fact[i] = ((fact[i - 1] % MOD) * i) % MOD;
  }
}
long long int combi(long long int a, long long int b) {
  if (b > a) return 0;
  if (b == a)
    return 1;
  else {
    long long int x = mod_poer(fact[b], MOD - 2, MOD) % MOD;
    long long int y = mod_poer(fact[a - b], MOD - 2, MOD) % MOD;
    return ((((fact[a]) * x) % MOD) * y) % MOD;
  }
}
long long int n, ar[105];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s1, s2;
  cin >> s1 >> s2;
  map<long long int, long long int> mpi;
  for (long long int i = 0; i < s1.size(); i++) {
    long long int a1 = (int)s1[i];
    long long int b1 = (int)s2[i];
    long long int a2, b2;
    mpi[a1] = b1;
    if (a1 < 97) {
      a2 = a1 + 32;
    } else
      a2 = a1 - 32;
    if (b1 < 97)
      b2 = b1 + 32;
    else
      b2 = b1 - 32;
    mpi[a2] = b2;
  }
  string s3;
  cin >> s3;
  string ans = "";
  for (long long int i = 0; i < s3.size(); i++) {
    long long int idx = (int)s3[i];
    if ((idx >= 65 && idx <= 90) || (idx >= 97 && idx <= 122)) {
      long long int re = mpi[idx];
      ans += (char)re;
    } else
      ans += s3[i];
  }
  cout << ans << endl;
  return 0;
}