#C7706. Fibonacci Sequence Generator

    ID: 51607 Type: Default 1000ms 256MiB

Fibonacci Sequence Generator

Fibonacci Sequence Generator

In this problem, you are required to generate the first n numbers of the Fibonacci sequence for multiple test cases. For each test case, the program reads an integer n and outputs the first n Fibonacci numbers separated by a single space. The Fibonacci sequence is defined as:

$$F(0)=0,\quad F(1)=1,\quad F(n)=F(n-1)+F(n-2) \text{ for } n\ge2. $$

You need to implement a solution that reads input from stdin and writes the result to stdout.

inputFormat

The first line contains a single integer T which represents the number of test cases. Each of the following T lines contains a single integer n (with n ≥ 1), representing the number of Fibonacci numbers to generate.

Input is provided via stdin.

outputFormat

For each test case, output a single line that contains the first n Fibonacci numbers separated by a single space.

The result is written to stdout.

## sample
3
1
2
5
0

0 1 0 1 1 2 3

</p>