SP8 CMPLS - Complete the Sequence!

Description

You probably know those quizzes in Sunday magazines: given the sequence 1, 2, 3, 4, 5, what is the next number? Sometimes it is very easy to answer, sometimes it could be pretty hard. Because these "sequence problems" are very popular, ACM wants to implement them into the "Free Time" section of their new WAP portal. ACM programmers have noticed that some of the quizzes can be solved by describing the sequence by polynomials. For example, the sequence 1, 2, 3, 4, 5 can be easily understood as a trivial polynomial. The next number is 6. But even more complex sequences, like 1, 2, 4, 7, 11, can be described by a polynomial. In this case, 1/2.n $ ^{2} $ -1/2.n+1 can be used. Note that even if the members of the sequence are integers, polynomial coefficients may be any real numbers. Polynomial is an expression in the following form: P(n) = a $ _{D} $ .n $ ^{D} $ +a $ _{D-1} $ .n $ ^{D-1} $ +...+a $ _{1} $ .n+a $ _{0} $ If a $ _{D} $ 0, the number D is called a _degree_ of the polynomial. Note that constant function P(n) = C can be considered as polynomial of degree 0, and the zero function P(n) = 0 is usually defined to have degree -1.

Input Format

There is a single positive integer T on the first line of input (equal to about 5000). It stands for the number of test cases to follow. Each test case consists of two lines. First line of each test case contains two integer numbers S and C separated by a single space, 1

Output Format

For every test case, your program must print a single line containing C integer numbers, separated by a space. These numbers are the values completing the sequence according to the polynomial of the lowest possible degree. In other words, you are to print values P $ _{min} $ (S+1), P $ _{min} $ (S+2), .... P $ _{min} $ (S+C). It is guaranteed that the results P $ _{min} $ (S+i) will be non-negative and will fit into the standard _integer_ type.

Explanation/Hint

**Warning: large Input/Output data, be careful with certain languages**