#include <bits/stdc++.h>
using namespace std;
int n, k, l;
char full[201000], buf[110];
vector<int> occ[30];
void debug() {
  for (int i = 0; i <= l - 1; i++) putchar(full[i]);
  putchar('\n');
}
int main() {
  scanf("%d\n%s\n", &k, buf);
  l = (int)strlen(buf);
  for (int i = 0; i <= k - 1; i++)
    for (int j = 0; j <= l - 1; j++) full[i * l + j] = buf[j];
  l *= k;
  for (int c = 'a'; c <= 'z'; c++) occ[c - 'a'].push_back(-1);
  for (int i = 0; i <= l - 1; i++) occ[full[i] - 'a'].push_back(i);
  scanf("%d", &n);
  for (int i = 0; i <= n - 1; i++) {
    int p;
    char c;
    scanf("%d %c", &p, &c);
    assert(((int)occ[c - 'a'].size()) > p);
    int ind = occ[c - 'a'][p];
    occ[c - 'a'].erase(occ[c - 'a'].begin() + p);
    full[ind] = '*';
  }
  for (int i = 0; i <= l - 1; i++)
    if (full[i] != '*') putchar(full[i]);
  putchar('\n');
  return 0;
}
