import sys input = sys.stdin.readline N=int(input()) S=input().strip() A=[0]*N ind=0 for s in S: if ind==0 and s=="<": print("error") exit() if ind==N-1 and s==">": print("error") exit() if s=="+": A[ind]+=1 if s=="-": A[ind]-=1 if s==">": ind+=1 if s=="<": ind-=1 print(*A)