import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
Scanner in
= new Scanner
(System.
in); int n
= Integer.
parseInt(in.
next()); char[] tape = new char[n];
for (int i = 0; i < n; i++)
tape[i] = 0;
int pointer = 0;
for (int i = 0; i < program.length(); i++) {
if (program.charAt(i) == '>')
pointer++;
if (program.charAt(i) == '<')
pointer--;
if (program.charAt(i) == '+')
tape[pointer]++;
if (program.charAt(i) == '-')
tape[pointer]--;
if (program.charAt(i) == '.')
System.
out.
print(tape
[pointer
]); if (program.charAt(i) == ',')
tape
[pointer
] = (char) System.
in.
read();
if (program.charAt(i) == '[') {
if (tape[pointer] == 0) {
int counter = 1;
while (counter > 0) {
i++;
if (program.charAt(i) == '[')
counter++;
if (program.charAt(i) == ']')
counter--;
}
}
}
else if (program.charAt(i) == ']') {
if (tape[pointer] != 0) {
int counter = 1;
while (counter > 0) {
i--;
if (program.charAt(i) == '[')
counter--;
if (program.charAt(i) == ']')
counter++;
}
}
}
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWludCBuID0gSW50ZWdlci5wYXJzZUludChpbi5uZXh0KCkpOwoJCWNoYXJbXSB0YXBlID0gbmV3IGNoYXJbbl07CgkJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspCgkJCXRhcGVbaV0gPSAwOwoJCWludCBwb2ludGVyID0gMDsKCQlTdHJpbmcgcHJvZ3JhbSA9IGluLm5leHQoKTsKCQlmb3IgKGludCBpID0gMDsgaSA8IHByb2dyYW0ubGVuZ3RoKCk7IGkrKykgewoJCQlpZiAocHJvZ3JhbS5jaGFyQ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A9PSAnXScpCgkJCQkJCQljb3VudGVyKys7CgkJCQkJfQoJCQkJfQoJICAgICAgICB9CgkJfQoJfQp9
MTAwCisrKysrKysrKytbJmd0OysrKysrKysmZ3Q7KysrKysrKysrKyZndDsrKysmZ3Q7KyZsdDsmbHQ7Jmx0OyZsdDstXSZndDsrKy4mZ3Q7Ky4rKysrKysrLi4rKysuJmd0OysrLiZsdDsmbHQ7KysrKysrKysrKysrKysrLiZndDsuKysrLi0tLS0tLS4tLS0tLS0tLS4mZ3Q7Ky4mZ3Q7Lgo=
100
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.