Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/for-fibonachchi-sonlari

Fibonacci numbers

Medium 1000 ms 64 MB 45%
Share

A positive integer $n$ is given. Print the first $n$ terms of the Fibonacci sequence: $F_{1}, F_{2}, \dots, F_{n}$.

$$F_{1} = 1, \qquad F_{2} = 1, \qquad F_{k} = F_{k-1} + F_{k-2} \ (k \ge 3)$$

The sequence of Fibonacci numbers

Input

One positive integer $n$.

Output

One line with $n$ Fibonacci numbers separated by spaces.

Note

$1 \le n \le 90$

Examples

Input #1
5
Output #1
1 1 2 3 5
Input #2
10
Output #2
1 1 2 3 5 8 13 21 34 55

Sign in to submit a solution

Signing up is free and takes a minute.