N,K=map(int,input().split()) S=list(input()) stack=[] mn=0 for s in S: if s=="(":stack.append(s) else: stack.pop() mn+=2 if len(stack)>0:mn-=1 if len(stack)>0 or mn>K:exit(print("No")) ans=[] sm=0 depth=0 for s in S: if s=="(": if len(ans)>0 and ans[-1]==")": ans.append("+") ans.append(s) ans.append("1+") sm+=1 stack.append(s) depth+=1 else: if depth==1: ans.append("1") ans.append(s) sm+=1 stack.pop() else: if ans[-1]=="1+": ans.append("1") sm+=1 ans.append(s) stack.pop() if len(stack)==0:depth=0 while sm