Paulliant is a linguist. Recently he received an article written in language A and he was told to translate it into language B. The two languages only differ in word order, so, Paulliant decided to translate by redefining the reading order of the articles, and came up with the following method.
Suppose that the article consists of

words, numbered as

. Paulliant generated a string

consisting of only '(', ')' and '-', whose length is also

. The string must satisfy the rule of bracket matching. Formally speaking, define

and
i%7D)
, representing the number of character '(' or ')' within the first

characters of the string, respectively, there is
i%7D)
for every

and
n%7D)
.
The process to read the article obeys the following rules.
- The process starts from the first word.
- For the
-th word, if
is '-' or ')', then read the
-th word directly, and jump to the
-th word. - For the
-th word, if
is '(', then find the matching right bracket of it. Supposing it to be
, read the
-th to
-th word, then read the
-th word, and finally jump to the
-th word. - If we are to read the
-th word (obviously it doesn't exist), the process ends.
Note that
the process is recursive, meaning that when reading the
)
-th to

-th word in rule (2), it still follows the four rules.
For example,
- If
,
is "(-)-", the reading order will be 2, 3, 1, 4. - If
,
is "-((-)-)", the reading order will be 1, 4, 5, 3, 6, 7, 2.
Now, give you the number of words

, and the string

Paulliant generated. Your task is to print the reading order following the four rules. It can be proved that the reading order should be
a permutation of numbers from

to

.