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
                                                                      //>>>BaZ<<<//
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
    static int dx[] = {-1,1,0,0,};
    static int dy[] = {0,0,1,-1};
    static long MOD = 1000000007;
    static int INF = Integer.MAX_VALUE/10;
    public static void main(String[] args) {
        new Thread(null,null,"BaZ",99999999)
        {
           public void run() 
           {
               try
               {
                   solve();
               }
               catch(Exception e)
               {   
                   e.printStackTrace();
                   System.exit(1);
               }
           }
        }.start();
    }
    static void solve() throws IOException
    { 
       Calendar CAL1 = Calendar.getInstance();
       CAL1.setTime(new Date());
       InputReader scan = new InputReader(System.in);   //Strings and numbers
       //Reader scan = new Reader();             //Numbers only
       PrintWriter out = new PrintWriter(System.out,true);
       StringBuilder sb = new StringBuilder("");     //fast output
       //MyFileReader scan = new MyFileReader();  //file input
       //PrintWriter out = new PrintWriter(new File("C://Users/Aman deep/Desktop/output.txt"));  //file output
       String a =  scan.next();
       String b = scan.next();
       char map[] = new char[26];
       for(int i=0;i<26;++i)
       {
           char c = Character.toLowerCase(a.charAt(i));
           map[c-'a'] = Character.toLowerCase(b.charAt(i));
       }
       String s = scan.next();
       for(int i=0;i<s.length();++i)
       {
           if(Character.isAlphabetic(s.charAt(i)))
           {
               char c = map[Character.toLowerCase(s.charAt(i))-'a'];
               if(Character.isUpperCase(s.charAt(i)))
                   c = Character.toUpperCase(c);
               sb.append(c);
           }
           else sb.append(s.charAt(i));
       }
       out.println(sb);
       Calendar CAL2 = Calendar.getInstance();
       CAL2.setTime(new Date());
       double Execution_Time = (double)(CAL2.getTimeInMillis()-CAL1.getTimeInMillis())/1000.000;
       //System.out.println("Execution time : "+Execution_Time+" seconds");
       out.flush();   
       out.close();
    }
    static class Pair implements Comparable<Pair>
    {
        int x,y;
        Pair(int x,int y)
        {
            this.x = x;
            this.y = y;
        }
        public int compareTo(Pair other)
        {
            if(other.x>this.x)
                return 1;
            else if(other.x<this.x)
                return -1;
            else 
            {
                if(other.y>this.y)
                    return 1;
                else if(other.y<this.y)
                    return -1;
                return 0;
            }
        }
        public String toString()
        {
            return "("+x+","+y+")";
        }
        public boolean equals(Object o)
        {
            if(o instanceof Pair)
            {
                Pair other = (Pair)o;
                return this.x==other.x && this.y==other.y;
            }
            return false;
        }
        public int hashCode()
        {
            return this.x+this.y;
        }
    }
    static class MyComparator implements Comparator<Pair>
    {
        public int compare(Pair a,Pair b)
        {
           if(a.x>b.x)
               return 1;
           else if(a.x<b.x)
               return -1;
           else if(a.y>b.y)
               return 1;
           else if(a.y<b.y)
               return -1;
           return 0;
        }
    }
    static class TupleD implements Comparable<TupleD>
    {
        int u,v;
        long w;
        TupleD(int u,int v,long w)
        {
            this.u = u;
            this.v = v;
            this.w = w;
        }
        public int compareTo(TupleD other)
        {
            if(this.w>other.w)
                return 1;
            else if(this.w==other.w)
                return 0;
            else return -1;
        }
        public String toString()
        {
            return "("+u+","+v+","+w+")";
        }
    }
        static class TupleI implements Comparable<TupleI>
    {
        int u,v,w;
        TupleI(int u,int v,int w)
        {
            this.u = u;
            this.v = v;
            this.w = w;
        }
        public int compareTo(TupleI other)
        {
            if(this.w>other.w)
                return 1;
            else if(this.w==other.w)
                return 0;
            else return -1;
        }
        public String toString()
        {
            return "("+u+","+v+","+w+")";
        }
    }
    static class TupleL implements Comparable<TupleL>
    {
        long u,v,w;
        TupleL(long u,long v,long w)
        {
            this.u = u;
            this.v = v;
            this.w = w;
        }
        public int compareTo(TupleL other)
        {
            if(this.w>other.w)
                return 1;
            else if(this.w==other.w)
                return 0;
            else return -1;
        }
        public String toString()
        {
            return "("+u+","+v+","+w+")";
        }
    }
    static class DSU
    {
        int arr[];
        int size[];
        DSU(int n)
        {
            size = new int[n];
            arr = new int[n];
            for(int i=0;i<n;++i)
            {
                arr[i] = i;
                size[i]++;
            }
        }
        int getroot(int A)
        {
            if(arr[A]==A)
                return A;
            return arr[A] = getroot(arr[A]);
        }
        boolean union(int A,int B)
        {
            int rootA = getroot(A);
            int rootB = getroot(B);
            if(rootA==rootB)
                return false;
            if(size[rootB]>size[rootA])
            {
                size[rootB]+=size[rootA];
                arr[rootA] = rootB;
            }
            else
            {
                size[rootA]+=size[rootB];
                arr[rootB] = rootA;
            }
            return true;
        }
    }
    static int gcd(int a,int b)
    {
        if(b==0)
            return a;
        return gcd(b,a%b);
    }
    static long gcd(long a,long b)
    {
        if(b==0)
            return a;
        return gcd(b,a%b);
    }
    static long modpow(long a,long b,long m)
    {
        if(b==0)
            return 1;
        if((b&1)==0)
            return modpow((a*a)%m,b>>1,m);
        else return (modpow((a*a)%m,b>>1,m)*a)%m;
    }
    static TupleI EEA(int A,int B)
    {
        if(B==0)
            return new TupleI(A,1,0);
        TupleI t = EEA(B,A%B);
        return new TupleI(t.u,t.w,t.v-(A/B)*t.w);
    }
     static TupleL EEA(long A,long B)
    {
        if(B==0)
            return new TupleL(A,1,0);
        TupleL t = EEA(B,A%B);
        return new TupleL(t.u,t.w,t.v-(A/B)*t.w);
    }
     static int mulmodin(int A,int M)
     {
         int x = EEA(A,M).v;
         return (x+M)%M;
     }
     static long mulmodin(long A,long M)
     {
         long x = EEA(A,M).v;
         return (x+M)%M;
     } 
    static class SegmentTree
    {
        int tree[];
        int arr[];
        int n;
        SegmentTree(int n,int a[])
        {  
            this.n = n;
            arr =  new int[n];
            for(int i=0;i<n;++i)
                arr[i] = a[i];
            int sz = (int)pow(2,(int)ceil(log(n)/log(2)));
            sz*=2;
            tree = new int[sz];
            build(0,n-1,1);
        }
        final void build(int low,int high,int treein)
        {
            if(low==high)
            {
                tree[treein] = arr[low];
            }
            else
            {
                int mid = (low+high)>>1;
                build(low,mid,2*treein);
                build(mid+1,high,2*treein+1);
                tree[treein] = min(tree[2*treein],tree[2*treein+1]);
            }
        }
        final void update(int index,int treein,int low,int high,int val)
        {
            if(low==high)
            {
                arr[index]=tree[treein]=val;
            }
            else
            {
                int mid = (low+high)>>1;
                if(index<=mid)
                    update(index,2*treein,low,mid,val);
                else update(index,2*treein+1,mid+1,high,val);
                tree[treein] = min(tree[2*treein],tree[2*treein+1]);
            }
        }
        final void update(int index,int val)
        {
            update(index,1,0,n-1,val);
        }
        final int query(int low,int high,int l,int r,int treein)
        {
            if(l<=low && high<=r)
                return tree[treein];
            else if(low>r || high<l)
                return Integer.MAX_VALUE;
            int mid = (low+high)>>1;
            int a = query(low,mid,l,r,2*treein);
            int b = query(mid+1,high,l,r,2*treein+1);
            return min(a,b);
        }
        final int query(int l,int r)
        {
            return query(0,n-1,l,r,1);
        }
        final int query(int index)
        {
            return query(0,n-1,0,index,1);
        }
    }
    static class MyFileReader                                          //File input template
    {
        StringTokenizer st;
        BufferedReader br;
        MyFileReader() throws IOException
        {
            br = new BufferedReader(new FileReader("C://Users/Aman deep/Desktop/input.txt"));
        }
        String nextLine() throws IOException
        {
            return br.readLine();
        }
        String next() throws IOException
        {
            if(st==null || !st.hasMoreTokens())
                st = new StringTokenizer(nextLine());
            return st.nextToken();
        }
        int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
        long nextLong() throws IOException
        {
            return Long.parseLong(next());
        }
        double nextDouble() throws IOException
        {
            return Double.parseDouble(next());
        }
    }
    	static class InputReader                                     //Normal input template
	{
		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 Reader {
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader() {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException {
        byte[] buf = new byte[64];
        int cnt = 0, c;
        while ((c = read()) != -1) {
            if (c == '\n') break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException {
        int ret = 0;
        byte c = read();
        while (c <= ' ') c = read();
        boolean neg = (c == '-');
        if (neg) c = read();
        do {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');
        if (neg) return -ret;
        return ret;
    }

    public long nextLong() throws IOException {
        long ret = 0;
        byte c = read();
        while (c <= ' ') c = read();
        boolean neg = (c == '-');
        if (neg) c = read();
        do {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');
        if (neg) return -ret;
        return ret;
    }

    public double nextDouble() throws IOException {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ') c = read();
        boolean neg = (c == '-');
        if (neg) c = read();
        do {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');
        if (c == '.') while ((c = read()) >= '0' && c <= '9') ret += (c - '0') / (div *= 10);
        if (neg) return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1) buffer[0] = -1;
    }

    private byte read() throws IOException {
        if (bufferPointer == bytesRead) fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException {
        if (din == null) return;
        din.close();
    }
}
}
