Oh, these brackets
The mathematical expression is presented as a product:
(±a_2x^2±a_1x±a_0)·(±b_2x^2±b_1x±b_0)·(±c_2x^2±c_1x±c_0)·... .
Each of the N brackets in the product contains an expression of the form: ±a_2x^2±a_1x±a_0, where at least one of the coefficients a_i (b_i, c_i, etc.) is non-zero.
Your task is to develop a program that multiplies the expressions within the brackets and outputs the resulting polynomial, combining terms by powers of x, in the format:
±q_2Nx^2N±q_{2N-1}x^{2N-1}...±q_3x^3±q_2x^2±q_1x±q_0.
Input
The first line of the input contains the number N (1 ≤ N ≤ 6).
The second line contains an expression with N pairs of brackets. Each pair contains an expression of the form ±a_2x^2±a_1x±a_0, where ± is either "+" or "-". If a coefficient is zero, that coefficient and its corresponding x are omitted, along with the sign and the coefficient. If a_i = ±1 and i > 0, the one is not shown before its corresponding x. If the last k coefficients are zero and the next one is positive, the sign "+" is not shown before it. Each coefficient a_i does not exceed 10.
The expression does not contain any arbitrary whitespace characters (spaces, tabs). The input ends with a newline. For questions about the input format, refer to the examples provided in the problem statement.
Output
On the first line of the output, display the expanded result of the given expression in the format:
±q_2Nx^2N±q_{2N-1}x^{2N-1}...±q_3x^3±q_2x^2±q_1x±q_0.
Follow the format shown in the examples as closely as possible.