Consider a sequence of positive integers: x_1, x_2, \dots, x_n. You are allowed to perform the following operations on this sequence:
For each from to in increasing order, set x_i \leftarrow x_i~\mathrm{xor}~x_{i-1}. We denote this operation by the letter .
For each from to in decreasing order, set x_i \leftarrow x_i~\mathrm{xor}~x_{i-1}. We denote this operation by the letter .
You are given an initial sequence x_1, x_2, \dots, x_n, as well as a string of operations consisting of the letters , , and repetition commands. A repetition command has the format , where T~(1 \le T \le 10^6) is an integer and the parentheses enclose a non-empty substring of operations. This means that the sequence of operations inside the parentheses must be executed exactly times.
Perform all the given operations on the initial sequence and print the resulting sequence.
The first line contains a single integer n~(1 \le n \le 30000) — the length of the sequence.
The second line contains integers x_i~(0 \le x_i \le 10^9) — the elements of the initial sequence.
The third line contains the operation string in the format described above. It is guaranteed that the length of this string does not exceed 10^5 characters.
It is also guaranteed that the total number of operations after expanding all repetitions does not exceed 10^{18}.
Print the resulting sequence x_1, x_2, \dots, x_n after applying all specified operations.
Example 1
Example 2