I=input N,M=map(int,I().split()) L=(N+M)*2 S,D,R=I(),[1]*L,range(L) C="C" j=L-1 for i in R[::-1]: if S[i]>C: D[j]=0 while i