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.
#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
const int FFTMOD = 1007681537;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const long double PI = acos((long double)-1);
const long double EPS = 1e-9;
inline long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long fpow(long long n, long long k, int p = MOD) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
template <class T>
inline int chkmin(T& a, const T& val) {
  return val < a ? a = val, 1 : 0;
}
template <class T>
inline int chkmax(T& a, const T& val) {
  return a < val ? a = val, 1 : 0;
}
inline long long isqrt(long long k) {
  long long r = sqrt(k) + 1;
  while (r * r > k) r--;
  return r;
}
inline long long icbrt(long long k) {
  long long r = cbrt(k) + 1;
  while (r * r * r > k) r--;
  return r;
}
inline void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
inline void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
inline int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
inline int inv(int a, int p = MOD) { return fpow(a, p - 2, p); }
inline int sign(long double x) { return x < -EPS ? -1 : x > +EPS; }
inline int sign(long double x, long double y) { return sign(x - y); }
const int maxc = 62;
struct node_t {
  node_t *p, *l, *r;
  int key, size;
  node_t* mx[maxc];
  node_t(int key) : p(0), l(0), r(0), key(key), size(1) {
    for (int i = (0); i < (maxc); i++) mx[i] = 0;
    mx[key] = this;
  }
};
int size(node_t* x) { return x ? x->size : 0; }
int isrt(node_t* x) { return !(x->p) || (x->p->l != x && x->p->r != x); }
int left(node_t* x) { return x->p->l == x; }
void setchild(node_t* x, node_t* p, int l) {
  (l ? p->l : p->r) = x;
  if (x) x->p = p;
}
void push(node_t* x) {}
void pull(node_t* x) {
  x->size = size(x->l) + 1 + size(x->r);
  for (int i = (0); i < (maxc); i++) {
    x->mx[i] = 0;
  }
  x->mx[x->key] = x;
  for (int i = (0); i < (maxc); i++) {
    if (x->l) {
      chkmax(x->mx[i], x->l->mx[i]);
    }
    if (x->r) {
      chkmax(x->mx[i], x->r->mx[i]);
    }
  }
}
void rotate(node_t* x) {
  node_t *p = x->p, *g = p->p;
  int l = left(x);
  setchild(l ? x->r : x->l, p, l);
  if (!isrt(p))
    setchild(x, g, left(p));
  else
    x->p = g;
  setchild(p, x, !l);
  pull(p);
}
node_t* splay(node_t* x) {
  push(x);
  while (!isrt(x)) {
    node_t *p = x->p, *g = p->p;
    if (g) push(g);
    push(p), push(x);
    if (!isrt(p)) rotate(left(x) != left(p) ? x : p);
    rotate(x);
  }
  pull(x);
  return x;
}
node_t* join(node_t* x, node_t* y) {
  if (!x) return y;
  while (x->r) push(x), x = x->r;
  push(x);
  setchild(y, x, 0);
  return splay(x);
}
void split(node_t* t, node_t*& x, node_t*& y, int pos) {
  if (pos < 0) {
    x = 0, y = t;
    return;
  }
  if (pos == size(t) - 1) {
    x = t, y = 0;
    return;
  }
  while (size(t->l) != pos) {
    push(t);
    if (size(t->l) > pos) {
      t = t->l;
    } else {
      pos -= size(t->l) + 1;
      t = t->r;
    }
  }
  splay(t);
  x = t;
  y = x->r;
  x->r = y->p = 0;
  pull(x);
}
void split(node_t* t, node_t*& x, node_t*& y, node_t*& z, int l, int r) {
  split(t, x, y, l - 1), split(y, y, z, r - l);
}
map<char, int> hs;
char rb[maxc];
void trace(node_t* x) {
  if (!x) return;
  push(x);
  trace(x->l);
  cout << char(rb[x->key]);
  trace(x->r);
}
void solve() {
  int ptr = 0;
  for (int i = ('a'); i < ('z' + 1); i++) hs[i] = ptr++, rb[ptr - 1] = i;
  for (int i = ('A'); i < ('Z' + 1); i++) hs[i] = ptr++, rb[ptr - 1] = i;
  for (int i = ('0'); i < ('9' + 1); i++) hs[i] = ptr++, rb[ptr - 1] = i;
  int n, m;
  cin >> n >> m;
  string s;
  cin >> s;
  node_t* rt = 0;
  for (int i = (0); i < (int((s).size())); i++) {
    int c = s[i];
    node_t* x = new node_t(hs[c]);
    rt = join(rt, x);
  }
  while (m--) {
    int l, r;
    char c;
    cin >> l >> r >> c;
    l--, r--;
    int ic = hs[c];
    node_t *x, *y, *z;
    split(rt, x, y, z, l, r);
    while (y && y->mx[ic]) {
      node_t* w = y->mx[ic];
      splay(w);
      if (w->l) w->l->p = 0;
      if (w->r) w->r->p = 0;
      y = join(w->l, w->r);
    }
    rt = join(x, join(y, z));
  }
  trace(rt);
  cout << "\n";
}
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(0), cin.tie(0);
  if (argc > 1) {
    assert(freopen(argv[1], "r", stdin));
  }
  if (argc > 2) {
    assert(freopen(argv[2], "wb", stdout));
  }
  solve();
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
