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.util.Scanner; 
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
 
public class M
{	
	public static int prime[] = new int[5000007];
 
	public static void main(String args[])
	{	
		InputReader In = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
    		
		String a = In.next();
		String b = In.next();
		
		HashMap<Character , Character> hm = new HashMap<Character , Character>();
		
		char test[] = In.next().toCharArray();
		
		for(int i = 0 ; i < 26 ; i++)
		{
			hm.put(a.charAt(i) , b.charAt(i));
		}
		
		for(int i = 0 ; i < test.length ; i++)
		{
			if(test[i] >= 97 && test[i] <= 122)
				w.print(hm.get(test[i]));
			else if(test[i] >= 65 && test[i] <= 90)
				w.print((char)(hm.get((char)(test[i]+32))-32));
			else
				w.print(test[i]);
		}
		
		w.close();
	}
	
	/*public static void sieve()
	{
		Arrays.fill(prime , 1);
		
		prime[0] = 0;
		prime[1] = 1;
		
		for(int i = 2 ; i*i < 5000007 ; i++)
		{
			if(prime[i] == 1)
			{
				for(int j = i+i ; j < 5000007 ; j+=i)
				{
					if(prime[j] == 1)
						prime[j] = i;
				}
			}
		}
	}
	
	public static long pow(int a , int b)
	{
		long ans = 1;
		
		while(b > 0)
		{
			if(b%2 == 1)
			{
				ans = (ans*a)%1000000007;
			}
			
			a = (a*a)%1000000007;
			
			b = b/2;
		}
		
		return ans;
	}
	
	static class Trip
	{
		int l;
		int r;
		int c;
		
		public Trip(int l , int r , int c)
		{
			this.l = l;
			this.r = r;
			this.c = c;
		}
	}
	
	public static int GCD(int a , int b)
	{
		if(b == 0)
			return a;
		else
			return GCD(b , a%b);
	}*/
 
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}
		
		public int read()
		{
			if (numChars==-1) 
				throw new InputMismatchException();
			
			if (curChar >= numChars)
			{
				curChar = 0;
				try 
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}
				
				if(numChars <= 0)				
					return -1;
			}
			return buf[curChar++];
		}
	 
		public String nextLine()
		{
			BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
			String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
		}
		public int nextInt()
		{
			int c = read();
			
			while(isSpaceChar(c)) 
				c = read();
			
			int sgn = 1;
			
			if (c == '-') 
			{
				sgn = -1;
				c = read();
			}
			
			int res = 0;
			do 
			{
				if(c<'0'||c>'9') 
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c)); 
			
			return res * sgn;
		}
		
		public long nextLong() 
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') 
			{
				sgn = -1;
				c = read();
			}
			long res = 0;
			
			do 
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}
		
		public double nextDouble() 
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') 
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.') 
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.') 
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c)) 
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}
		
		public String readString() 
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do 
			{
				res.appendCodePoint(c);
				c = read();
			} 
			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 String next() 
		{
			return readString();
		}
		
		public interface SpaceCharFilter 
		{
			public boolean isSpaceChar(int ch);
		}
	}
	
	static class Node implements Comparable<Node>
	{
		int floor;
		int time;
		
		public Node(int floor  , int time)
		{
			this.floor = floor;
			this.time = time;
		}
		
		public int compareTo(Node node)
		{
			if(floor < node.floor)
				return 1;
			
			if(floor > node.floor)
				return -1;
			
			if(time <= node.time)
				return 1;
			
			return -1;
		}
	}
}