#K93432. Modified Fibonacci Sequence

    ID: 38418 Type: Default 1000ms 256MiB

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.

## sample
1
1