import sys input = sys.stdin.readline N,K=map(int,input().split()) S=input().strip() flag=1 now=0 for s in S: if s=="(": now+=1 else: now-=1 if now<0: flag=0 if now!=0 or flag==0: print("No") exit() ANS=[] for s in S: if ANS and ANS[-1]==")" and s=="(": ANS.append("+") if ANS and ANS[-1]=="(" and s==")": ANS.append("1+1") if ANS and ANS[-1]=="(" and s=="(": ANS.append("1+") ANS.append(s) A="".join(ANS) c=A.count("1") if c>K: print("No") else: A+="+1"*(K-c) print(A)