D

Triangle and Polynomial

Input: Standard Input

Output: Standard Output

 

An angle of given triangle is twice of another angle of the same triangle. The largest angle of this triangle is 120 degree. The bisector of the second largest angle intersects its opposite side at point D. The distance of point D from the vertex containing the largest angle is d (d is a positive integer). If the length of the largest side of this triangle is 2x then mathematicians have proved that x is the root of some polynomial of degree n (n>3) whose coefficients are all integers. Given the value of d and degree n you will have to find such a polynomial.

 

Input

The input file contains less than 220 lines of inputs.  The description of each set is given below:

 

Input for each set is packed in one line. This line contains two integers d (0<d<31) and n (3<n<11). The meaning of d and n is given in the problem statement.

 

Input is terminated by a line containing two zeroes.

 

Output

For each set of input produce one line of output. This line contains (n+1) integers which denotes the coefficients of the polynomial (In descending order of power). The constant term of the polynomial cannot be zero. Such polynomials (with zero constant term) will be considered as wrong answer. Also the absolute value all the coefficients should be less than 109.

 

Sample Input                               Output for Sample Input

10 4

0 0

 

16 -160 -4800 -12000 30000


Problemsetter: Shahriar Manzoor

Special Thanks: Derek Kisman , Mohammad Mahmudur Rahman