Complete the Sequence!

Time limit1sMemory limit128 MB

Problem

You may know the sequence puzzles from magazines: given a sequence such as 1, 2, 3, 4, 5, what is the next number? Sometimes the answer is easy, sometimes it is quite hard. Because such sequence puzzles are popular, we want to add them to the "Free Time" section of a new portal.

Many of these puzzles can be solved by describing the sequence with a polynomial. For example, the sequence 1, 2, 3, 4, 5 can be seen as a trivial polynomial, and the next number is 6. Even a more complex sequence such as 1, 2, 4, 7, 11 can be described by a polynomial; here $\frac{1}{2}n^2 - \frac{1}{2}n + 1$ works. Note that even when the members of the sequence are integers, the polynomial coefficients may be any real numbers.

A polynomial has the following form:

$$P(n) = a_D \cdot n^D + a_{D-1} \cdot n^{D-1} + \cdots + a_1 \cdot n + a_0.$$

If $a_D \neq 0$, the number $D$ is called the degree of the polynomial. A constant function $P(n) = C$ can be considered a polynomial of degree $0$, and the zero function $P(n) = 0$ is usually defined to have degree $-1$.

Input

The first line contains a single positive integer $T$, the number of test cases that follow.

Each test case consists of two lines. The first line contains two integers $S$ and $C$ separated by a single space, with $1 \le S < 100$, $1 \le C < 100$, and $S + C \le 100$. Here $S$ is the length of the given sequence, and $C$ is how many further numbers you must find.

The second line contains $S$ integers $X_1, X_2, \ldots, X_S$ separated by spaces. They form the given sequence. The sequence can always be described by a polynomial $P(n)$ such that $X_i = P(i)$ for every $i$. Among all such polynomials, let $P_{\min}$ be the one of lowest possible degree; this is the polynomial used to complete the sequence.

Output

For each test case, print a single line containing $C$ integers separated by single spaces. These are the values completing the sequence according to the polynomial of lowest possible degree, that is $P_{\min}(S+1), P_{\min}(S+2), \ldots, P_{\min}(S+C)$.

It is guaranteed that every result $P_{\min}(S+i)$ is non-negative and fits into a standard integer type.