N,Q = map(int,input().split())
s = str(input())
t = []
d = []
num = []
golem = []
for n in range(N):
    golem.append(1)
for j in range(Q):
    m,u = map(str,input().split())
    t.append(m)
    d.append(u)

for i in range(Q):
    for k in range(N):
        if t[i] == s[k]:
            num.append(k)
    if d[i] == "R":
        try:
            golem[int(num[i])] -= 1
        except:
            continue
        try:
            golem[int(num[i+1])] += 1
        except:
            continue
        
    elif d[i] == "L":
        try:
            golem[int(num[i])] -= 1
        except:
            continue
        try:
            golem[int(num[i-1])] += 1
        except:
            continue
    


    
   

print(golem)