n = int(input()) Ans = [0] * n now = 0 for s in input(): if s == "<": now -= 1 elif s == ">": now += 1 elif s == "+": Ans[now] += 1 else: Ans[now] -= 1 if not 0 <= now < n: print("error") break else: print(*Ans)