#include <bits/stdc++.h>
template <typename T>
T inline SQR(const T &a) {
  return a * a;
}
template <typename T>
T inline ABS(const T &a) {
  return a < 0 ? -a : a;
}
const double EPS = 1e-9;
inline int SGN(double a) {
  return ((a > EPS) ? (1) : ((a < -EPS) ? (-1) : (0)));
}
inline int CMP(double a, double b) { return SGN(a - b); }
using namespace std;
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  const int ALPH = 'z' - 'a' + 1;
  int k;
  cin >> k;
  string s;
  cin >> s;
  vector<int> occ[ALPH];
  int len = int((s).size());
  for (int i = 0; i < len; ++i) {
    int now = s[i] - 'a';
    int pos = i + 1;
    for (int j = 0; j < k; ++j) {
      occ[now].push_back(pos);
      pos += len;
    }
  }
  for (int i = 0; i < ALPH; ++i) sort(occ[i].begin(), occ[i].end());
  int n, p;
  char c;
  cin >> n;
  while (n--) {
    cin >> p >> c;
    occ[c - 'a'].erase((occ[c - 'a'].begin() + (p - 1)));
  }
  vector<pair<int, char> > ans;
  for (int i = 0; i < ALPH; ++i) {
    for (int j = 0; j < int((occ[i]).size()); ++j) {
      ans.push_back(make_pair(occ[i][j], char(i + 'a')));
    }
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < int((ans).size()); ++i) cout << ans[i].second;
  cout << "\n";
  return 0;
}
