#include <bits/stdc++.h>
using namespace std;
char s[120], t[300000];
int re[300000], num[26][300000], a[26];
int main() {
  int k, op, n;
  char oh;
  cin.sync_with_stdio(false);
  while (cin >> k >> s) {
    int len1 = strlen(s);
    memset(re, 0, sizeof(re));
    memset(num, 0, sizeof(num));
    memset(a, 0, sizeof(a));
    for (int i = 0, j = 0; i < k * len1; i++) {
      t[i] = s[j++];
      if (j == len1) j = 0;
    }
    int len = strlen(t);
    t[len] = 0;
    for (int i = 0; i < len; i++) {
      int en = t[i] - 'a';
      a[en]++;
      num[en][a[en]] = i;
    }
    cin >> op;
    while (op--) {
      cin >> n >> oh;
      int hehe = oh - 'a';
      re[num[hehe][n]] = 1;
      for (int i = n + 1; i <= a[hehe]; i++) {
        num[hehe][i - 1] = num[hehe][i];
      }
      a[hehe]--;
    }
    for (int i = 0; i < len; i++) {
      if (!re[i]) cout << t[i];
    }
    cout << endl;
  }
}
