#include <bits/stdc++.h>
char s[200010];
int tree[26][200010 << 2];
bool vis[200010];
inline void PushUp(int t, int rt) {
  tree[t][rt] = tree[t][rt << 1] + tree[t][rt << 1 | 1];
}
void Update(int t, int x, int L, int R, int rt) {
  if (L == R)
    tree[t][rt] = 1;
  else {
    int mid = (L + R) >> 1;
    if (mid >= x)
      Update(t, x, L, mid, rt << 1);
    else
      Update(t, x, mid + 1, R, rt << 1 | 1);
    PushUp(t, rt);
  }
}
int Find(int t, int x, int L, int R, int rt) {
  if (L == R) {
    tree[t][rt] = 0;
    return L;
  }
  int ans, mid = (L + R) >> 1;
  if (tree[t][rt << 1] >= x)
    ans = Find(t, x, L, mid, rt << 1);
  else {
    x -= tree[t][rt << 1];
    ans = Find(t, x, mid + 1, R, rt << 1 | 1);
  }
  PushUp(t, rt);
  return ans;
}
int main() {
  char ch;
  int k, i, j, q, len, n;
  while (~scanf("%d %s%d", &k, s + 1, &q)) {
    memset(vis, false, sizeof(vis));
    memset(tree, 0, sizeof(tree));
    len = strlen(s + 1);
    n = len * k;
    for (j = len + 1; --k;) {
      for (i = 1; i <= len; i++) s[j++] = s[i];
    }
    s[j] = 0;
    for (i = 1; s[i]; i++) Update(s[i] - 'a', i, 1, n, 1);
    while (q--) {
      scanf("%d %c", &i, &ch);
      k = Find(ch - 'a', i, 1, n, 1);
      vis[k] = true;
    }
    for (i = 1; s[i]; i++) {
      if (!vis[i]) putchar(s[i]);
    }
    putchar('\n');
  }
  return 0;
}
