#include <bits/stdc++.h>
using namespace std;
bool erased[26][200001];
int s[26][200001];
int cnt[26];
int getSum(int *s, int r) {
  int ret = 0;
  while (r) {
    ret += s[r];
    r &= r - 1;
  }
  return ret;
}
void update(int *s, int ind) {
  while (ind < 200001) {
    s[ind]++;
    ind = (ind | (ind - 1)) + 1;
  }
}
int getPos(int *s, int ind) {
  int l = 0, r = 200000, mid;
  while (l < r - 1) {
    mid = l + r >> 1;
    if (mid - getSum(s, mid) < ind)
      l = mid;
    else
      r = mid;
  }
  return r;
}
int main() {
  int n, m, i, j;
  string given;
  cin >> m >> given >> n;
  while (n--) {
    char ch[2];
    int pos;
    scanf("%d%s", &pos, &ch);
    ch[0] -= 'a';
    pos = getPos(s[ch[0]], pos);
    erased[ch[0]][pos] = true;
    update(s[ch[0]], pos);
  }
  while (m--) {
    for (i = 0; i < given.size(); i++) {
      char c = given[i] - 'a';
      ++cnt[c];
      if (erased[c][cnt[c]]) continue;
      putchar(c + 'a');
    }
  }
  puts("");
  return 0;
}
