func_code_string: #include <bits/stdc++.h>   using namespace std;   const int SIZE = 2100;   struct kstr {     int C[30];     bool mask[110];   } A[SIZE];   int CC[30];   int main() {     int K, N, len;     char S[110];     cin >> K >> S >> N;     len = strlen(S);     for (int i = 0; i != len; i++) CC[S[i] -  a ]++;     for (int i = 0; i != K; i++) {       for (int j = 0; j != len; j++) A[i].mask[j] = true;       for (int j = 0; j != 30; j++) A[i].C[j] = CC[j];     }     int a;     char ch;     while (N--) {       cin >> a >> ch;       int sumch = 0;       for (int i = 0; i != K; i++)         if (sumch + A[i].C[ch -  a ] >= a) {           a -= sumch;           A[i].C[ch -  a ]--;           for (int j = 0; j != len; j++) {             if (S[j] == ch && A[i].mask[j]) a--;             if (!a) {               A[i].mask[j] = false;               break;             }           }           break;         } else           sumch += A[i].C[ch -  a ];     }     for (int i = 0; i != K; i++)       for (int j = 0; j != len; j++)         if (A[i].mask[j]) cout << S[j];     return 0;   }   