#K93432. Modified Fibonacci Sequence
Modified Fibonacci Sequence
Modified Fibonacci Sequence
Compute the first N terms of the Modified Fibonacci Series. The series is defined as follows: the first three terms are given by:
$$ a_1 = 1, \quad a_2 = 1, \quad a_3 = 2 $$
For all \( n \geq 4 \),
$$ a_n = a_{n-1} + a_{n-2} + a_{n-3} $$
Given an integer N, output the first N terms of this series as a space-separated sequence.
inputFormat
The input consists of a single integer N (\(1 \leq N \leq 50\)) representing the number of terms to compute.
outputFormat
Output the first N terms of the Modified Fibonacci series on one line separated by a single space.
## sample1
1