Petya has a string of length n consisting of small and large English letters and digits.

He performs m operations. Each operation is described with two integers l and r and a character c: Petya removes from the string all characters c on positions between l and r, inclusive. It's obvious that the length of the string remains the same or decreases after each operation.

Find how the string will look like after Petya performs all m operations.

Input

The first string contains two integers n and m (1 ≤ n, m ≤ 2·105) — the length of the string and the number of operations.

The second line contains the string of length n, consisting of small and large English letters and digits. Positions in the string are enumerated from 1.

Each of the next m lines contains two integers l and r (1 ≤ l ≤ r), followed by a character c, which is a small or large English letter or a digit. This line describes one operation. It is guaranteed that r doesn't exceed the length of the string s before current operation.

Output

Print the string Petya will obtain after performing all m operations. If the strings becomes empty after all operations, print an empty line.

Examples

Input

4 2
abac
1 3 a
2 2 c


Output

b


Input

3 2
A0z
1 3 0
1 1 z


Output

Az


Input

10 4
agtFrgF4aF
2 5 g
4 9 F
1 5 4
1 7 a


Output

tFrg4


Input

9 5
aAAaBBccD
1 4 a
5 6 c
2 3 B
4 4 D
2 3 A


Output

AB

Note

In the first example during the first operation both letters 'a' are removed, so the string becomes "bc". During the second operation the letter 'c' (on the second position) is removed, and the string becomes "b".

In the second example during the first operation Petya removes '0' from the second position. After that the string becomes "Az". During the second operations the string doesn't change.
/* Author: Ronak Agarwal */
import java.io.* ; import java.util.* ; import java.math.* ;
import static java.lang.Math.min ;
import static java.lang.Math.max ;
import static java.lang.Math.abs ;
/* Thread is created here to increase the stack size of the java code so that recursive dfs can be performed */
public class Codeshefcode{
	public static void main(String[] args) throws IOException{
		new Thread(null,new Runnable(){	public void run(){ exec_Code() ;} },"Solver",1l<<27).start() ;
	}
	static void exec_Code(){
		try{
			Solver Machine = new Solver() ;
			Machine.Solve() ; Machine.Finish() ;}
		catch(Exception e){ e.printStackTrace() ; print_and_exit() ;}
		catch(Error e){ e.printStackTrace() ; print_and_exit() ; }
	}
	static void print_and_exit(){ System.out.flush() ; System.exit(-1) ;}
}
/* Implementation of the pair class, useful for every other problem */
class pair implements Comparable<pair>{
	long x ; long y ;
	pair(long _x,long _y){ x=_x ; y=_y ;} 
	public int compareTo(pair p){
		return (this.x<p.x ? -1 : (this.x>p.x ? 1 : (this.y<p.y ? -1 : (this.y>p.y ? 1 : 0)))) ;
	}
}
/* Main code starts here */
class Solver extends Template{
	int n,m,arr[],seg[] ;
	myset set[] ;
	public void Solve() throws IOException{
		n = ip.i() ;
		m = ip.i() ;
		arr = new int[n+1] ;
		seg = new int[5*n] ;
		char c[] = ip.s().toCharArray() ;
		for(int i=1 ; i<=n ; i++)
			arr[i] = mapToint(c[i-1]) ;
		build(1,1,n) ;
		set = new myset[62] ;
		for(int i=0 ; i<62 ; i++) set[i] = new myset() ;
		for(int i=1 ; i<=n ; i++) set[arr[i]].add(i) ;
		while(m--!=0){
			int l = ip.i() ;
			int r = ip.i() ;
			int cr = mapToint(ip.s().charAt(0)) ;
			int ll = findInd(l) ;
			int rr = findInd(r) ;
			myset st = set[cr] ;
			mylist ls = new mylist() ;
			Integer idx = st.higher(ll-1) ;
			while(idx!=null && idx<=rr){
				update(1,1,n,idx) ;
				ls.add(idx) ;
				idx = st.higher(idx) ;
			}
			for(int elem : ls) st.remove(elem) ;
		}
		char res[] = new char[n+1] ;
		Arrays.fill(res,'\0') ;
		for(int i=0 ; i<62 ; i++) for(int elem : set[i]) res[elem] = maptoChar(i) ;
		for(int i=1 ; i<=n ; i++) if(res[i]!='\0') p(res[i]) ;
		pln("") ;		
	}
	char maptoChar(int i){
		if(i<26) return (char) (i+'a') ;
		if(i<52) return (char) ((i-26)+'A') ;
		return (char) ((i-52)+'0') ;
	}
	int findInd(int i){
		int l = 1 ; int r = n;
		int sm=0 ;
		int nd = 2 ;
		while(l!=r){
			int m = (l+r)/2 ;
			int val = seg[nd] ;
			if((sm+val)<i){
				nd++ ;
				l=m+1 ;
				sm+=val ;
			}else
				r=m ;
			nd*=2 ;
		}
		return l ;
	}
	void build(int i,int s,int e){
		if(s==e){
			seg[i]=1 ;
			return ;
		}
		int m = (s+e)/2 ;
		build(2*i,s,m) ; build(2*i+1,m+1,e) ;
		seg[i] = seg[2*i]+seg[2*i+1] ;
	}
	void update(int i,int s,int e,int pos){
		if(e<pos || pos<s) return ;
		if(s==e){
			seg[i]=0 ;
			return ;
		}
		int m = (s+e)/2 ;
		update(2*i,s,m,pos) ; update(2*i+1,m+1,e,pos) ;
		seg[i] = seg[2*i]+seg[2*i+1] ;
	}
	int mapToint(char cr){
		if(cr>='a' && cr<='z') return cr-'a' ;
		if(cr>='A' && cr<='Z') return 26+(cr-'A') ;
		return (52+(cr-'0')) ;
	}
}

/* All the useful functions,constants,renamings are here*/
class Template{
	/* Constants Section */
	final int INT_MIN = Integer.MIN_VALUE ; final int INT_MAX = Integer.MAX_VALUE ;
	final long LONG_MIN = Long.MIN_VALUE ; final long LONG_MAX = Long.MAX_VALUE ;
	static long MOD = 1000000007 ;
	static Reader ip = new Reader(System.in) ;	
	static PrintWriter op = new PrintWriter(System.out) ;
	/* Methods for writing */
	static void p(Object o){ op.print(o) ; }
	static void pln(Object o){ op.println(o) ;}
	static void Finish(){ op.flush();	op.close(); }
	/* Implementation of operations modulo MOD */
	static long inv(long a){ return powM(a,MOD-2) ; }
	static long m(long a,long b){ return (a*b)%MOD ; }
	static long d(long a,long b){ return (a*inv(b))%MOD ; }
	static long powM(long a,long b){
		if(b<0) return powM(inv(a),-b) ;
		long val=a ; long ans=1 ;
		while(b!=0){
			if((b&1)==1) ans = (ans*val)%MOD ; 
			val = (val*val)%MOD ; 
			b/=2 ;
		}
		return ans ;
	}
	/* Renaming of some generic utility classes */
	final static class mylist extends ArrayList<Integer>{}
	final static class myset extends TreeSet<Integer>{}
	final static class mystack extends Stack<Integer>{}
	final static class mymap extends TreeMap<Long,Integer>{}
}

class Reader{
	BufferedReader reader;
	StringTokenizer tkz;
	Reader(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input)) ;
		tkz = new StringTokenizer("") ;
	}
	String s() throws IOException{
		while (!tkz.hasMoreTokens()) tkz = new StringTokenizer(reader.readLine()) ;
		return tkz.nextToken() ;
	}
	int i() throws IOException{ return Integer.parseInt(s()) ;}
	long l() throws IOException{ return Long.parseLong(s()) ;}
	double d() throws IOException{	return Double.parseDouble(s()) ;}
}