#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 10;
char s[maxn];
int vis[maxn];
int a[26][4 * maxn];
void getSum(int ch, int o) { a[ch][o] = a[ch][2 * o] + a[ch][2 * o + 1]; }
void update(int ch, int i, int o, int L, int R) {
  if (L == R) {
    a[ch][o] = 1;
    return;
  }
  int M = (L + R) / 2;
  if (i <= M)
    update(ch, i, 2 * o, L, M);
  else
    update(ch, i, 2 * o + 1, M + 1, R);
  getSum(ch, o);
}
int deleted(int ch, int n, int o, int L, int R) {
  if (L == R) {
    a[ch][o] = 0;
    return L;
  }
  int M = (L + R) / 2, ans;
  if (n <= a[ch][2 * o])
    ans = deleted(ch, n, 2 * o, L, M);
  else
    ans = deleted(ch, n - a[ch][2 * o], 2 * o + 1, M + 1, R);
  getSum(ch, o);
  return ans;
}
int main() {
  int k, m;
  while (~scanf("%d%s%d", &k, s + 1, &m)) {
    memset(vis, 0, sizeof(vis));
    memset(a, 0, sizeof(a));
    int len = strlen(s + 1);
    int n = len * k, j, i;
    for (j = len + 1; --k;)
      for (i = 1; i <= len; i++) s[j++] = s[i];
    s[j] = 0;
    for (int i = 1; s[i]; i++) {
      update(s[i] - 'a', i, 1, 1, n);
    }
    char c[5];
    while (m--) {
      scanf("%d%s", &k, c);
      int num = deleted(c[0] - 'a', k, 1, 1, n);
      vis[num] = 1;
    }
    for (int i = 1; s[i]; i++)
      if (vis[i] == 0) printf("%c", s[i]);
    puts("");
  }
  return 0;
}
