Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

The following languages are only available languages for the problems from the contest

Unknown Language Round #3:

- Pike 7.8

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

F. Polynom

time limit per test

2 secondsmemory limit per test

64 megabytesinput

standard inputoutput

standard outputYou are given a polynom in form *p*(*x*) = (*x* + *a*_{1})·(*x* + *a*_{2})·... (*x* + *a*_{n}). Write Pike program to print it in a standard form *p*(*x*) = *x*^{n} + *b*_{1}*x*^{n - 1} + ... + *b*_{n - 1}*x* + *b*_{n}. You should write each addend in form «C*X^K» (for example, 5*X^8).

Please, write the polynom in the shortest way, so you should skip unnecessary terms: some terms «C*X^K» should be reduced or even omitted. Look for the samples for clarification.

Input

The first line of the input contains *n* (1 ≤ *n* ≤ 9). The following *n* lines contain integer *a*_{i} ( - 10 ≤ *a*_{i} ≤ 10).

Output

Print the given polynom in a standard way. Note, that the answer in this problem response uniquely determined.

Examples

Input

2

-1

1

Output

X^2-1

Input

2

1

1

Output

X^2+2*X+1

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jan/26/2020 04:14:29 (e2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|