The mathematical expression is given as a product:
Each of the bracketed factors contains an expression of the form \pm a_{2}x^{2} \pm a_{1}x \pm a_{0}, where at least one coefficient a_i (b_i, c_i, and so on) is nonzero.
Your task is to write a program that multiplies the bracketed expressions and outputs the resulting function as a polynomial, combining like terms by powers of , i.e.:
The first line of input contains the number (1 \leq N \leq 6).
The second line contains an expression with pairs of brackets. Inside each pair is an expression of the form \pm a_{2}x^{2} \pm a_{1}x \pm a_{0}, where is either a "+" or "-" sign. If any coefficient is zero, that coefficient, its corresponding , and the sign are omitted. If a_i = \pm 1 and i > 0, the one is not written before its . If the last (by index) coefficients are zero and the next coefficient is positive, the "+" sign is not written in front of it. Each coefficient a_i does not exceed in absolute value.
There are no arbitrary whitespace characters (spaces, tabs) in the expression. The input ends with a newline character. If you have questions about the input format, refer to the examples in the problem statement.
On the first line of output, print the result of expanding the brackets in the given expression in the following format:
following the input description.
Follow the format shown in the examples as closely as possible.
Example 1