#include <bits/stdc++.h>
using namespace std;
struct VS {
  vector<int> V;
  int sz;
  VS() { sz = 0; }
};
vector<map<char, VS> > str;
int main() {
  int k, n;
  string s, st;
  int num;
  char sym;
  cin >> k >> s >> n;
  st = s;
  map<char, VS> firstS;
  vector<map<char, VS> > res;
  int l = s.length();
  for (int i = 0; i < l; i++) {
    firstS[s[i]].V.push_back(i);
    firstS[s[i]].sz++;
  }
  for (int t = 1; t < k; t++) {
    for (map<char, VS>::iterator it = firstS.begin(); it != firstS.end();
         it++) {
      for (int j = 0; j < it->second.sz; j++) {
        it->second.V.push_back(it->second.V.at(j) + t * l);
      }
    }
    st.append(s);
  }
  for (int i = 0; i < n; i++) {
    cin >> num >> sym;
    st.at(firstS[sym].V.at(num - 1)) = ' ';
    firstS[sym].V.erase(firstS[sym].V.begin() + num - 1);
  }
  for (int i = 0; i < st.length(); i++) {
    if (st[i] != ' ') cout << st[i];
  }
  return 0;
}
