import sys sys.setrecursionlimit(10**7) N=int(input()) d=int(input()) S=input().strip() D=[-1]*N Q=[] for i in range(len(S)): if S[i]=="d": Q.append(i) elif S[i]=="}": D[Q[-1]]=i Q.pop() def calc(L,R): ANS=[0]*12 ind=L score=1 dim=0 while ind<=R: #print(ANS,ind) if S[ind]=="d": x=D[ind] X=diff(calc(ind+2,x-1)) for i in range(len(X)): ANS[i]+=X[i] ind=x+1 score=1 dim=0 if ind