#include <bits/stdc++.h>
using namespace std;
map<char, vector<int> > trees;
map<char, vector<int> > m;
bool eliminado[200000 + 10];
int K, M, L, Q, n;
char sModel[100 + 10];
char s[200000 + 10];
char k;
void update(char c, int node, int L, int R, int pos) {
  if (L == R) {
    trees[c][node] = 0;
    eliminado[m[c][L - 1]] = true;
    return;
  }
  int med = (L + R) / 2;
  int left = trees[c][2 * node];
  int right = trees[c][2 * node + 1];
  if (pos <= left)
    update(c, 2 * node, L, med, pos);
  else
    update(c, 2 * node + 1, med + 1, R, pos - left);
  trees[c][node]--;
}
void build(char c, int node, int L, int R) {
  if (L == R) {
    trees[c][node] = 1;
    return;
  }
  int med = (L + R) / 2;
  build(c, 2 * node, L, med);
  build(c, 2 * node + 1, med + 1, R);
  trees[c][node] = trees[c][2 * node] + trees[c][2 * node + 1];
}
int main() {
  scanf("%d", &K);
  scanf("%s", &sModel);
  L = strlen(sModel);
  for (int i = 0; i < K; i++)
    for (int j = 0; j < L; j++) s[L * i + j + 1] = sModel[j];
  L *= K;
  for (int i = 1; i <= L; i++) m[s[i]].push_back(i);
  for (char c = 'a'; c <= 'z'; c++)
    if (!m[c].empty()) {
      trees[c].resize((int)m[c].size() * 4);
      build(c, 1, 1, (int)m[c].size());
    }
  scanf("%d", &Q);
  for (int i = 0; i < Q; i++) {
    scanf("%d %c", &n, &k);
    update(k, 1, 1, m[k].size(), n);
  }
  for (int i = 1; i <= L; i++)
    if (!eliminado[i]) printf("%c", s[i]);
}
