#include int A[12]; int main(){ int N; std::string S; std::cin>>N>>S; int* P = A + 1; for(int i=0;S[i]!='\0';i++){ if(S[i] == '+'){ (*P)++; } if(S[i] == '-'){ (*P)--; } if(S[i] == '>'){ P++; } if(S[i] == '<'){ P--; } if(P <= A || A + N < P){ std::cout<<"error\n"; exit(0); } } for(int i=1;i<=N;i++){ std::cout<