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.
/*
Keep solving problems.
*/

import java.util.*;
import java.io.*;

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000 * 1000 * 1000 + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    void build_tree(int node, int nodeStartIndex, int nodeEndIndex) {
        if(nodeStartIndex > nodeEndIndex) return; // Out of range
        if(nodeStartIndex == nodeEndIndex) { // Leaf node
            tree[node] = arr[nodeStartIndex]; // Init value
            return;
        }

        build_tree(node * 2, nodeStartIndex, (nodeStartIndex + nodeEndIndex) / 2); // Init left child
        build_tree(node * 2 + 1, 1 + (nodeStartIndex + nodeEndIndex) / 2, nodeEndIndex); // Init right child
        tree[node] = tree[node * 2] +  tree[node * 2 + 1]; // Init root value
    }

    /**
     * Increment elements within range [queryStartIndex, queryEndIndex] with value
     */
    void update_tree(int node, int nodeStartIndex, int nodeEndIndex, int queryIndex) {
        if(nodeStartIndex > nodeEndIndex || nodeStartIndex > queryIndex || nodeEndIndex < queryIndex) // Current segment is not within range [i, j]
            return;
        if(nodeStartIndex == nodeEndIndex) { // Segment is fully within range
            tree[node] = 0;
            return;
        }

        update_tree(node * 2, nodeStartIndex, (nodeStartIndex + nodeEndIndex) / 2, queryIndex); // Updating left child
        update_tree(node * 2 + 1, 1 + (nodeStartIndex + nodeEndIndex) / 2, nodeEndIndex, queryIndex); // Updating right child

        tree[node] = tree[node * 2] + tree[node * 2 + 1]; // Updating root
    }

    /**
     * Query tree to get max element value within range [queryStartIndex, queryEndIndex]
     */
    int query_tree(int node, int nodeStartIndex, int nodeEndIndex, int queryStartIndex, int queryEndIndex) {
        if(nodeStartIndex > nodeEndIndex || nodeStartIndex > queryEndIndex || nodeEndIndex < queryStartIndex) return 0; // Out of range
        if(nodeStartIndex >= queryStartIndex && nodeEndIndex <= queryEndIndex) // Current segment is totally within range [i, j]
            return tree[node];

        int q1 = query_tree(node * 2, nodeStartIndex, (nodeStartIndex + nodeEndIndex) / 2, queryStartIndex, queryEndIndex); // Query left child
        int q2 = query_tree(1 + node * 2, 1 + (nodeStartIndex + nodeEndIndex) / 2, nodeEndIndex, queryStartIndex, queryEndIndex); // Query right child

        return q1 + q2;
    }

    int arr[];
    int tree[];
    int n;
    char[] alpha;
    List<TreeSet<Integer>> pos = new ArrayList<>();
    int limit = 62;
    void solve() throws IOException {
        n = nextInt();
        int m = nextInt();
        alpha = nextString().toCharArray();
        for (int i = 0; i < limit; i++) {
            pos.add(new TreeSet<>());
        }

        for (int i = 0; i < n; i++) {
            pos.get(findPos(alpha[i])).add(i);
        }


        arr = new int[n];
        Arrays.fill(arr, 1);
        tree = new int[5 * arr.length];
        build_tree(1, 0, n - 1);

        boolean[] alive = new boolean[n];
        Arrays.fill(alive, true);

        for (int i = 0; i < m; i++) {
            String[] tmp = nextString().split(" ");
            int l = Integer.parseInt(tmp[0]);
            int r = Integer.parseInt(tmp[1]);
            char c = tmp[2].charAt(0);

            TreeSet<Integer> cur = pos.get(findPos(c));
            List<Integer> removes = new ArrayList<>();
            for (int v : cur.tailSet(findInd(l))) {
                if (v > findInd(r)) {
                    break;
                }

                removes.add(v);
            }

            for (int v : removes) {
                cur.remove(v);
                update_tree(1, 0, n - 1, v);
                alive[v] = false;
            }
        }

        for (int i = 0; i < n; i++) {
            if (alive[i]) {
                out(alpha[i]);
            }
        }
    }

    int findPos(char c) {
        if (c >= '0' && c <= '9') {
            return c - '0';
        }
        else if (c >= 'a' && c <= 'z') {
            return c - 'a' + 10;
        }
        else {
            return c - 'A' + 36;
        }
    }

    char convert2Char(int idx) {
        if (idx < 10) {
            return (char) (idx + '0');
        }
        else if (idx < 10 + 26) {
            return (char) (idx - 10 + 'a');
        }
        else {
            return (char) (idx - 36 + 'A');
        }
    }
    int findInd(int cnt) {
        int left = 0;
        int right = n;
        while (left < right) {
            int mid = (left + right) / 2;
            if (query_tree(1, 0, n - 1, 0, mid) < cnt) {
                left = mid + 1;
            }
            else {
                right = mid;
            }
        }

        return left;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }

    long gcd(long a, long b) {
        while(a != 0 && b != 0) {
            long c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }

    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        System.out.format("%.9f%n", val);
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}