import java.util.Scanner;
public class Main {
static int N = 50;
static int[] f = new int[N];
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
if(n == 1) System.out.print(0);
if(n == 2) System.out.print(0 + " " + 1);
if(n >= 3)
{
f[1] = 0; System.out.print(0 +" ");
f[2] = 1;System.out.print(1 +" ");
for(int i = 3;i <= n;i++)
{
f[i] = f[i - 1] + f[i - 2];
System.out.print(f[i] +" ");
}
}
}
}
第三项开始 f[n] = f[n-1] + f[n-2];