#include <bits/stdc++.h>
using namespace std;
int n, q;
string w, r[3];
int dp[251][251][251], next_oc[100002][26];
void compute(int a, int b, int c) {
  int &val = dp[a][b][c];
  val = n;
  if (a) val = min(val, next_oc[dp[a - 1][b][c] + 1][r[0][a - 1] - 'a']);
  if (b) val = min(val, next_oc[dp[a][b - 1][c] + 1][r[1][b - 1] - 'a']);
  if (c) val = min(val, next_oc[dp[a][b][c - 1] + 1][r[2][c - 1] - 'a']);
}
int main() {
  cin >> n >> q >> w;
  for (int i = 0; i < 26; i++) next_oc[n][i] = next_oc[n + 1][i] = n;
  for (int i = n - 1; i >= 0; i--)
    for (int j = 0; j < 26; j++)
      next_oc[i][j] = w[i] == 'a' + j ? i : next_oc[i + 1][j];
  dp[0][0][0] = -1;
  int mx[3], mn[3];
  while (q--) {
    int id;
    char c, flag;
    cin >> flag >> id;
    id--;
    if (flag == '+') {
      cin >> c;
      r[id] += c;
      for (int i = 0; i < 3; i++) mx[i] = r[i].size();
      for (int i = 0; i < 3; i++) mn[i] = id == i ? mx[i] : 0;
      for (int i = mn[0]; i <= mx[0]; i++)
        for (int j = mn[1]; j <= mx[1]; j++)
          for (int k = mn[2]; k <= mx[2]; k++) compute(i, j, k);
    } else {
      r[id].pop_back();
    }
    if (dp[r[0].size()][r[1].size()][r[2].size()] < n)
      puts("Yes");
    else
      puts("No");
  }
}
