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>
const long long int MOD = 1e9 + 7;
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, 1, -1, 0, 0, -1, 1};
int dx4[] = {0, 0, 1, -1};
int dy4[] = {1, -1, 0, 0};
using namespace std;
void vok() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
}
bool isprime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n == 5 or n == 7) return true;
  if (n % 2 == 0 or n % 5 == 0 or n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i += 6) {
    if (n % i == 0 or n % (i + 2) == 0) return false;
  }
  return true;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return ((a * b) / gcd(a, b));
}
vector<long long int> pp;
void gen() {
  vector<bool> prime(33000, true);
  prime[0] = prime[1] = false;
  for (int p = 0; p * p <= 33000; p++) {
    if (prime[p]) {
      for (int i = p * p; i <= 33000; i += p) prime[i] = false;
    }
  }
  for (int i = 0; i < 33000; i++)
    if (prime[i]) pp.push_back(i);
}
int find(string s1, char k) {
  if (k >= 'A' and k <= 'Z') k = k - 'A' + 'a';
  for (int i = 0; i < s1.size(); i++) {
    if (k == s1[i]) return i;
  }
  return -1;
}
void solve() {
  long long int n, m, x, y, a, b, c, d, k;
  long long int mx = -1;
  long long int mi = INT_MAX;
  a = b = x = y = k = c = 0;
  long long int ans = 0, res = 0;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  n = s3.size();
  string A;
  for (int i = 0; i < n; i++) {
    if (s3[i] >= '0' and s3[i] <= '9') {
      A += s3[i];
      continue;
    }
    x = find(s1, s3[i]);
    if (s3[i] >= 'A' and s3[i] <= 'Z') {
      A += s2[x] - 'a' + 'A';
    } else
      A += s2[x];
  }
  cout << A << endl;
}
int main() {
  vok();
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}