#include <bits/stdc++.h>
using namespace std;
long long count(long long n) {
  long long k = n, s = 0;
  while (k > 0) {
    s += k % 10;
    k /= 10;
  }
  return s;
}
long long div(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return n / i;
    }
  }
  return 0;
}
long long d, x, y;
void extendedEuclid(long long A, long long B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(B, A % B);
    int temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long isPrime(long long n) {
  if (n == 0 || n == 1) return 0;
  if (n % 2 == 0) return 2;
  if (n % 3 == 0) return 3;
  for (long long i = 5; i * i <= n; i = i + 6) {
    if (n % i == 0) return i;
    if (n % (i + 2) == 0) return i + 2;
  }
  return n;
}
int main() {
  long long k, i, n, j;
  cin >> k;
  string s;
  cin >> s;
  cin >> n;
  string ans = "";
  for (i = 0; i < k; i++) {
    ans += s;
  }
  vector<vector<long long> > a(1000);
  for (i = 0; i < ans.size(); i++) {
    a[ans[i] - 'a'].push_back(i);
  }
  for (i = 0; i < n; i++) {
    long long x;
    char y;
    cin >> x >> y;
    a[y - 'a'].erase(a[y - 'a'].begin() + x - 1);
  }
  multiset<pair<long long, char> > fi;
  for (long long c = 0; c <= 26; c++) {
    for (i = 0; i < a[c].size(); i++) {
      fi.insert(make_pair(a[c][i], c + 'a'));
    }
  }
  multiset<pair<long long, char> >::iterator itr;
  for (itr = fi.begin(); itr != fi.end(); ++itr) {
    pair<long long, char> p = *itr;
    cout << p.second;
  }
}
