import java.util.*;
class Main {
public int[] solution(int n) {
int[] answer = new int[n];
answer[0] = 1;
answer[1] = 1;
int start = 1;
for(int i=2; i<n; i++) {
answer[i] = answer[i-1] + answer[i-2];
}
return answer;
}
//배열 사용하지 않기
public void solution2(int n) {
int a=1, b=1,c;
System.out.print(a +" " +b);
for (int i = 2; i < n; i++) {
c = a+b;
System.out.print(" " + c);
a = b;
b = c;
}
}
public static void main(String[] args) {
Main T = new Main();
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
for (int x : T.solution(n)) {
System.out.print(x +" ");
}
}
}
배열로 풀 때와 직접 출력할때 모두 기억해두자!