The Fibonacci series appears in sunflower seeds, pinecones and even ancient Indian poetry (Pingala's work).
The series starts 0, 1 and each next term is the sum of the previous two: 0, 1, 1, 2, 3, 5, 8, …
Print the first N terms.
Input Format
A single integer N.
Output Format
Print the first N terms separated by single spaces.
Constraints
• 1 ≤ N ≤ 50
• Terms can go above 2^31, so use long long or long.
Examples
Example 1
Input
7
Output
0 1 1 2 3 5 8
Explanation 0, 1, then 0+1=1, 1+1=2, 1+2=3, 2+3=5, 3+5=8.
Example 2
Explanation Only the first term.
Example 3
Explanation The first two terms.
Acceptance
—
Accepted
0
Submissions
0