Problem E
Stupid Sequence
Input: Standard Input

Output: Standard Output

 

A stupid sequence is a sequence generated by a function defined by a polynomial as shown below:

 

 

So the stupid sequence is actually f(1), f(2), f(3), f(4)…

You can assume that for all i (), .

In this problem you will be given the first 1500 terms of stupid sequence, and you will have to find the values of .

 

Input

First line of the input file contains an integer N (0<N<101) which denotes the total number of input set.  The description of each set is given below:

 

Each set contains 1500 lines of inputs. Each line contains a single integer. The i-th line of a set denotes the i-th element of a stupid sequence. All these integers fit in 64-bit unsigned integer. There is a blank line after the input of each set. 

 

Output

For each set of input produce one line of output. This line contains the values of . All these values are non-negative and less than 1001. If such values are not found print a line “This is a smart sequence!” instead.

 

 

Sample Input                            Output for Sample Input

sample.in

 

//Too large to paste here so //download from the link above

 

1 0 0 0 0 0 0

0 1 1 0 0 0 0

This is a smart sequence!

 


Problemsetter: Shahriar Manzoor

Special Thanks: Abdullah al Mahmud