n = int(input()) d = [0] * n p = 0 for c in input(): if c == '>': p += 1 elif c == '<': p -= 1 elif c == '+': d[p] += 1 else: d[p] -= 1 if not (0 <= p < n): print('error') break else: print(*d)