#include <bits/stdc++.h>
using namespace std;
char s[102];
string t;
vector<long long> occ[300];
bool clr[200002];
int rem[300];
int main() {
  int k;
  scanf("%d", &k);
  scanf("%s", s);
  int len = strlen(s);
  int idx = 0;
  for (long long i = 0; i < k; i++) {
    t += s;
    for (long long j = 0; j < len; j++) occ[s[j]].push_back(idx++);
  }
  int n, p;
  char c;
  scanf("%d", &n);
  for (long long i = 0; i < n; i++) {
    scanf("%d %c", &p, &c);
    int pos = occ[c][p - 1];
    clr[pos] = 1;
    occ[c].erase(occ[c].begin() + p - 1);
  }
  string res;
  for (long long i = 0; i < ((long long)(t).size()); i++)
    if (!clr[i]) res += t[i];
  cout << res;
  return 0;
}
