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
import java.util.*;
import java.io.*;

public class ProbB {
	public static void main(String[] args) {
		ProbB sol = new ProbB();
		sol.start();
	}

	StringBuffer printstr;
	String _readerstr;
	BufferedReader rdr;
	HashSet<Integer> debug_number_set;
	int[] debug_code;

	public void print(Object o){ print(o, 0); }
	public void print(Object o, int debug_number){
		if(debug_number_set.contains(debug_number)) System.out.print(o);
	}
	public void println() { print("\n", 0); }
	public void println(Object o) { println(o, 0); }
	public void println(Object o, int debug_number){ print(o+"\n", debug_number); }

	public void bufp(Object o){ printstr.append(o); }
	public void bufpl(Object o){ printstr.append(o).append('\n'); }
	public void bufpl() { printstr.append('\n'); }
	public void bufp(char[] c, int offset, int len){ printstr.append(c, offset, len); }
	public void bufpl(char[] c, int offset, int len){ printstr.append(c, offset, len).append('\n'); }
	
	public Integer readInt(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		try{
			return Integer.parseInt(s[0]);
		}
		catch(Exception e){}
		return readInt();
	}
	
	public Long readLong(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		try{
			return Long.parseLong(s[0]);
		}
		catch(Exception e){}
		return readLong();
	}
	
	public Double readDouble(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		try{
			return Double.parseDouble(s[0]);
		}
		catch(Exception e){}
		return readDouble();
	}
	
	public String readStr(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		return s[0];
	}
	
	public String readLine(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String ret = _readerstr;
		_readerstr = null;
		return ret;
	}
	
	public void initiate_the_entire_program(){
		printstr = new StringBuffer();
		_readerstr = null;
		try{
			rdr = new BufferedReader(new InputStreamReader(System.in));
		}
		catch(Exception e){ println(e); }
		debug_number_set = new HashSet();
		for(int i : debug_code) debug_number_set.add(i);
	}

	public void start(){
		debug_code = new int[] {0,1,2,3,4,5};
		initiate_the_entire_program();
		
		submit();
		
		System.out.println(printstr);
		System.out.flush();
	}
	
	public void submit(){
		char[] first = readLine().toCharArray();
		char[] second = readLine().toCharArray();
		char[] third = readLine().toCharArray();
		bufpl(new String(encode(first, second, third)));
	}
	
	public char[] encode(char[] first, char[] second, char[] third){
		int[] table = new int[26];
		for(int i=0;i<26;i++){
			table[first[i]-'a'] = (second[i]-'a');
		}
		int n = third.length;
		char[] ret = new char[n];
		for(int i=0;i<n;i++){
			char c = third[i];
			if(c<='Z' && c>='A'){
				ret[i] = (char) (table[c-'A'] + 'A');
			}
			else if(c<='z' && c>='a'){
				ret[i] = (char) (table[c-'a'] + 'a');
			}
			else ret[i] = c;
		}
		return ret;
	}
}