#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e9;
const int N = 1e5 + 5;
void out(int a, int b, int c) { cout << a << " " << b << " " << c << '\n'; }
void solve() {
  int k;
  cin >> k;
  string s, a;
  cin >> s;
  for (int i = 0; i < k; i++) a.append(s);
  vector<int> mp[26];
  for (int i = 0; i < a.size(); i++) {
    char c = a[i];
    mp[c - 'a'].push_back(i);
  }
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    int p;
    char c;
    cin >> p >> c;
    p--;
    a[mp[c - 'a'][p]] = '0';
    mp[c - 'a'].erase(mp[c - 'a'].begin() + p);
  }
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '0') continue;
    cout << a[i];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << showpoint;
  cout << setprecision(9);
  int test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
