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 JAVA):

Solution:

import java.io.*;
import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        InputReader in = new InputReader(System.in);
        PrintWriter p = new PrintWriter(System.out);
        
        String s1 = in.readString();
        String s2 = in.readString();
        String s = in.readString();
        char s1a[] = s1.toCharArray();
        char s2a[] = s2.toCharArray();
        char sa[] = s.toCharArray();
        HashMap<Character, Character> hmap = new HashMap<>();
        
        for(int i=0;i<26;i++){
            hmap.put(s1a[i], s2a[i]);
        }
        StringBuilder sb = new StringBuilder("");
        
        for(int i=0;i<sa.length;i++){
            if(sa[i]>=65 && sa[i]<=90){
                sa[i]+=32;
                sb.append(hmap.get(sa[i]).toString().toUpperCase());
            }
                
                
            else if(sa[i]>=97 && sa[i]<=122)
                sb.append(hmap.get(sa[i]));
                
            else
                sb.append(sa[i]);
                
        }
        p.print(sb);
        p.flush();
        p.close();
    }
    public static int KMP(String text, String pattern){
        int n = text.length();
        int m = pattern.length();

        int fail[] = computeFailArray(pattern);
        int i=0;
        int j=0;
        while(i<n){
            if(text.charAt(i)==pattern.charAt(j)){          
                i++;
                j++;
                if(j==m){
                    return i-j;      
                }
            }
            else if(j>0)
                j=fail[j-1];
            else
                i++;            
        }
        return -1;
    }

    public static int[] computeFailArray(String pattern){
        int m = pattern.length();
        int fail[] = new int[m];
        fail[0] = 0;
        int j=0;
        int i=1;
        while(i<m){
            if(pattern.charAt(j)==pattern.charAt(i)){
                fail[i]=j+1;
                j++;
                i++;
            }
            else if(j>0){
                j=fail[j-1];
            }
            else
                i++;       
        }
        return fail;
    }

    static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}