During the archaeological research in the Middle East you found the traces of three ancient religions: First religion, Second religion and Third religion. You compiled the information on the evolution of each of these beliefs, and you now wonder if the followers of each religion could coexist in peace.

The Word of Universe is a long word containing the lowercase English characters only. At each moment of time, each of the religion beliefs could be described by a word consisting of lowercase English characters.

The three religions can coexist in peace if their descriptions form disjoint subsequences of the Word of Universe. More formally, one can paint some of the characters of the Word of Universe in three colors: $1$, $2$, $3$, so that each character is painted in at most one color, and the description of the $i$-th religion can be constructed from the Word of Universe by removing all characters that aren't painted in color $i$.

The religions however evolve. In the beginning, each religion description is empty. Every once in a while, either a character is appended to the end of the description of a single religion, or the last character is dropped from the description. After each change, determine if the religions could coexist in peace.


-----Input-----

The first line of the input contains two integers $n, q$ ($1 \leq n \leq 100\,000$, $1 \leq q \leq 1000$) — the length of the Word of Universe and the number of religion evolutions, respectively. The following line contains the Word of Universe — a string of length $n$ consisting of lowercase English characters.

Each of the following line describes a single evolution and is in one of the following formats:   + $i$ $c$ ($i \in \{1, 2, 3\}$, $c \in \{\mathtt{a}, \mathtt{b}, \dots, \mathtt{z}\}$: append the character $c$ to the end of $i$-th religion description.  - $i$ ($i \in \{1, 2, 3\}$) – remove the last character from the $i$-th religion description. You can assume that the pattern is non-empty. 

You can assume that no religion will have description longer than $250$ characters.


-----Output-----

Write $q$ lines. The $i$-th of them should be YES if the religions could coexist in peace after the $i$-th evolution, or NO otherwise.

You can print each character in any case (either upper or lower).


-----Examples-----
Input
6 8
abdabc
+ 1 a
+ 1 d
+ 2 b
+ 2 c
+ 3 a
+ 3 b
+ 1 c
- 2

Output
YES
YES
YES
YES
YES
YES
NO
YES

Input
6 8
abbaab
+ 1 a
+ 2 a
+ 3 a
+ 1 b
+ 2 b
+ 3 b
- 1
+ 2 z

Output
YES
YES
YES
YES
YES
NO
YES
NO



-----Note-----

In the first example, after the 6th evolution the religion descriptions are: ad, bc, and ab. The following figure shows how these descriptions form three disjoint subsequences of the Word of Universe: $\left. \begin{array}{|c|c|c|c|c|c|c|} \hline \text{Word} & {a} & {b} & {d} & {a} & {b} & {c} \\ \hline ad & {a} & {} & {d} & {} & {} & {} \\ \hline bc & {} & {b} & {} & {} & {} & {c} \\ \hline ab & {} & {} & {} & {a} & {b} & {} \\ \hline \end{array} \right.$

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "n, q = map(int, input().split())\ns = '!' + input()\n\nnxt = [[n + 1] * (n + 2) for _ in range(26)]\nfor i in range(n - 1, -1, -1):\n    c = ord(s[i + 1]) - 97\n    for j in range(26):\n        nxt[j][i] = nxt[j][i + 1]\n    nxt[c][i] = i + 1\n\nw = [[-1], [-1], [-1]]\nidx = lambda i, j, k: i * 65536 + j * 256 + k\ndp = [0] * (256 * 256 * 256)\ndef calc(fix=None):\n    r = list(map(range, (len(w[0]), len(w[1]), len(w[2]))))\n    if fix is not None: r[fix] = range(len(w[fix]) - 1, len(w[fix]))\n    for i in r[0]:\n        for j in r[1]:\n            for k in r[2]:\n                dp[idx(i, j, k)] = min(nxt[w[0][i]][dp[idx(i - 1, j, k)]] if i else n + 1,\n                                       nxt[w[1][j]][dp[idx(i, j - 1, k)]] if j else n + 1,\n                                       nxt[w[2][k]][dp[idx(i, j, k - 1)]] if k else n + 1)\n                if i == j == k == 0: dp[idx(i, j, k)] = 0\n\nout = []\nfor _ in range(q):\n    t, *r = input().split()\n    if t == '+':\n        i, c = int(r[0]) - 1, ord(r[1]) - 97\n        w[i].append(c)\n        calc(i)\n    else:\n        i = int(r[0]) - 1\n        w[i].pop()\n    req = dp[idx(len(w[0]) - 1, len(w[1]) - 1, len(w[2]) - 1)]\n    out.append('YES' if req <= n else 'NO')\n\nprint(*out, sep='\\n')"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 134230292