import sys readline=sys.stdin.readline write=sys.stdout.write T=readline().rstrip() L,R=[],[] for t in T: if t=="(": break L.append(t) for t in T[::-1]: if t==")": break R.append(t) ans_lst=L+["@"]+R[::-1] print(*ans_lst,sep="")