#include <bits/stdc++.h>
using namespace std;
long long int m, n, c, d, j, k, l, r, x, t, y, u, b, z, i, e, f, g, h, a;
string s, p, q;
char ch;
vector<long long int> mp[1000];
map<long long int, long long int> mk;
int main() {
  cin >> n >> s >> t;
  p = s;
  n -= 1;
  for (i = 0; i < n; i++) p += s;
  n = p.size();
  for (i = 0; i < n; i++) mp[p[i]].push_back(i);
  while (t--) {
    cin >> a >> ch;
    j = mp[ch][a - 1];
    p[j] = '0';
    mp[ch].erase(mp[ch].begin() + a - 1);
  }
  for (auto i : p) {
    if (i != '0') cout << i;
  }
}
