n=gets.to_i s=gets.chomp v=[0]*n idx=0 for c in s.chars do if c==?> then idx+=1 elsif c==?< then idx-=1 elsif c==?+ then v[idx]+=1 elsif c==?- then v[idx]-=1 end if idx<0||idx>=n then puts "error" exit end end puts v*' '