#include #include using namespace std; using namespace atcoder; using mint = modint998244353; //using mint = modint1000000007; typedef long long ll; typedef pair P; typedef tuple T; templatebool chmax(T& a, const T& b) { if (a < b) { a = b;return true; } else { return false; } } templatebool chmin(T& a, const T& b) { if (a > b) { a = b;return true; } else { return false; } } #ifdef LOCAL templateostream& operator<<(ostream& o, const pair& p) { return o << "(" << p.first << ", " << p.second << ")"; } templateauto operator<<(ostream& o, const T& v)->decltype(v.begin(), o) { o << "{";int c = 0;for (auto& x : v)o << (c++ ? ", " : "") << x;return o << "}"; } #define dbg(...) cerr<<"["<<#__VA_ARGS__<<"]: ",([](auto&&... a){((cerr<> n; string s; cin >> s; vector a(n, 0); int pos = 0; for (int i = 0; i < (int)(s).size(); i++) { if (s[i] == '+')a[pos]++; else if (s[i] == '-')a[pos]--; else if (s[i] == '>')pos++; else if (s[i] == '<')pos--; if (pos < 0 || pos >= n) { cout << "error" << "\n"; return 0; } } for (auto x : a)cout << x << ' '; cout << "\n"; }