human
Andi and Bob were friends since childhood days. But, as they grew up Bob started behaving weird and this used to irritate Andi. Once, while Andi took a break after typing a large program Bob came from nowhere and swapped some alphabet keys on Andi's keyboard.

Andi got very angry on seeing this and decided to end their friendship once forever. As we all know Bob is very good at heart and never does anything wrong intentionally. He decided to type the remaining program with the same keyboard Configuration.
Given the original fragment of the code that Bob needs to type, You need to tell Bob the code that he should type to get the original code as output.

Help him saving his friendship with Andi.

INPUT  :

First line of the input contains a single integer N denoting the number of swaps done by Bob. Next N lines contain a pair of characters A,B denoting the characters which are swapped by Bob (Note that Bob performs these swaps in the given order).
From the very next line of input the remaining fragment of the code starts and ends with an end of file character.

OUTPUT:

print the fragment of the program that Bob types.

CONSTRAINTS:

1 ≤ N ≤ 10^6

1 ≤ |length of codefragment| ≤ 10^6

code fragment contains uppercase and lowercase english alphabets only and space.

A,B belongs to Alphabet set (both upper case and lower case letters are included).

SAMPLE INPUT
1
W H
WelloHorld

SAMPLE OUTPUT
HelloWorld

Explanation

For the given test case:

Letter W is swapped with the letter H. So, to type WelloHorld Bob must type HelloWorld on Andi's keyboard.
Solve the task in PYTHON.
 ... Write me a Python code to print the fragment of the program that Bob types?
assistant
#Here is Python code to print the fragment of the program that Bob types.

class FastScanner:
    def __init__(self):
        import sys
        self.inp = sys.stdin.read().split("\n")
        self.readAt = -1
    def nextInt(self):
        self.readAt += 1
        return int(self.inp[self.readAt])
    def nextString(self):
        self.readAt += 1
        return self.inp[self.readAt]
    def nextRange(self, n):
        self.readAt += n
        return self.inp[self.readAt-n+1:self.readAt+1]
    def skip(self, n):
        self.readAt += n
 
class PrintWriter:
    def __init__(self):
        self.pw = []
    def println(self, n):
        self.pw.append(n)
    def flush(self):
        print "\n".join(map(str, self.pw))
        self.pw = []

def main():
	fs = FastScanner()
	pw = PrintWriter()
	n = fs.nextInt()
	from string import ascii_lowercase as al, ascii_uppercase as au
	mapping = {i:i for i in al}
	revmap = {i:i for i in al}
	for i in xrange(n):
		a,b = fs.nextString().split()
		character1 = a.lower()
		character2 = b.lower()
		c = revmap[character1]
		d = revmap[character2]
		mapping[c] = character2
		mapping[d] = character1
		revmap[character2] = c
		revmap[character1] = d
	s = fs.nextString()
	ans = ""
	for i in s:
		p = "print"
		if ord(i)>96:
			ans += mapping[i]
			p = mapping[i]
		elif ord(i)>63:
			ans += mapping[i.lower()].upper()
			p = mapping[i.lower()].upper()
		else:
			ans += i
			p = i
	pw.println(ans)
	pw.flush()

if __name__ == "__main__":
	main()