Problem: The name of one small but proud corporation consists of n lowercase English letters. The Corporation has decided to try rebranding — an active marketing strategy, that includes a set of measures to change either the brand (both for the company and the goods it produces) or its components: the name, the logo, the slogan. They decided to start with the name.

For this purpose the corporation has consecutively hired m designers. Once a company hires the i-th designer, he immediately contributes to the creation of a new corporation name as follows: he takes the newest version of the name and replaces all the letters xi by yi, and all the letters yi by xi. This results in the new version. It is possible that some of these letters do no occur in the string. It may also happen that xi coincides with yi. The version of the name received after the work of the last designer becomes the new name of the corporation.

Manager Arkady has recently got a job in this company, but is already soaked in the spirit of teamwork and is very worried about the success of the rebranding. Naturally, he can't wait to find out what is the new name the Corporation will receive.

Satisfy Arkady's curiosity and tell him the final version of the name.

Input

The first line of the input contains two integers n and m (1 ≤ n, m ≤ 200 000) — the length of the initial name and the number of designers hired, respectively.

The second line consists of n lowercase English letters and represents the original name of the corporation.

Next m lines contain the descriptions of the designers' actions: the i-th of them contains two space-separated lowercase English letters xi and yi.

Output

Print the new name of the corporation.

Examples

Input

6 1
police
p m


Output

molice


Input

11 6
abacabadaba
a b
b c
a d
e g
f a
b b


Output

cdcbcdcfcdc

Note

In the second sample the name of the corporation consecutively changes as follows:

<image>

<image>

<image>

<image>

<image>

<image>

Solution (in JAVA):

Solution:
import java.util.*;


public class bucky{




public static void main (String args[]) {

Scanner input=new Scanner(System.in);

HashMap<String, String> map1= new HashMap<String, String>();
HashMap<String, String> map2= new HashMap<String, String>();
HashMap<String, String> map3= new HashMap<String, String>();
HashMap<String, String> map4= new HashMap<String, String>();
HashMap<Integer, Integer> linieright= new HashMap<Integer, Integer>();

	
	map3.put("a"," 1 ");
map3.put("b"," 2 ");
map3.put("c"," 3 ");
map3.put("d"," 4 ");
map3.put("e"," 5 ");
map3.put("f"," 6 ");
map3.put("g"," 7 ");
map3.put("h"," 8 ");
map3.put("i"," 9 ");
map3.put("j"," 10 ");
map3.put("k"," 11 ");
map3.put("l"," 12 ");
map3.put("m"," 13 ");
map3.put("n"," 14 ");
map3.put("o"," 15 ");
map3.put("p"," 16 ");
map3.put("q"," 17 ");
map3.put("r"," 18 ");
map3.put("s"," 19 ");
map3.put("t"," 20 ");
map3.put("u"," 21 ");
map3.put("v"," 22 ");
map3.put("x"," 23 ");
map3.put("y"," 24 ");
map3.put("w"," 25 ");
map3.put("z"," 26 ");

			
	
			
			
			String nn=input.next();
			String mm=input.next();
			
			int n=Integer.parseInt(nn);
					
			int m=Integer.parseInt(mm);
			
			String str=input.next();
			
			
		map1.put("a","a");
map1.put("b","b");
map1.put("c","c");
map1.put("d","d");
map1.put("e","e");
map1.put("f","f");
map1.put("g","g");
map1.put("h","h");
map1.put("i","i");
map1.put("j","j");
map1.put("k","k");
map1.put("l","l");
map1.put("m","m");
map1.put("n","n");
map1.put("o","o");
map1.put("p","p");
map1.put("q","q");
map1.put("r","r");
map1.put("s","s");
map1.put("t","t");
map1.put("u","u");
map1.put("v","v");
map1.put("x","x");
map1.put("y","y");
map1.put("w","w");
map1.put("z","z");

			
			String nou="";
			String a="";
			String b="";
			
			for(int i=0;i<m;i++){
			
				a=input.next();
			 b=input.next();
			 
		
			    String part=map1.get(a);
			map1.put(a,map1.get(b));
			map1.put(b,part);
			
		//	System.out.println(a+" " +map1.get(a)+"  "+b+"  "+map1.get(b));
			
			
		
			
			
			
		//	System.out.println("a= "+a+"  "+map1.get(a));
				//	System.out.println("b= "+b+"  "+map1.get(b));
			
			}
			
			for(String x:map1.keySet())
			map2.put(map1.get(x),x);
			
			for(String x:map1.keySet()){
			map4.put(map3.get(x),map2.get(x));
		//	System.out.println(map3.get(x)+"  "+map2.get(x));
			
			}
			
		for(String x:map3.keySet())
		str=str.replaceAll(x,map3.get(x));
	//	System.out.println(str);
			
			for(String x:map4.keySet())
			str=str.replaceAll(x,map4.get(x));
			
			
		
			System.out.println(str);
			
			
		
			
			
			}
			
			
			
			}