import java.util.ArrayList;
import java.util.Scanner;
class Main {
public int[] solution(int n) {
int[] answer = new int[n];
answer[0] = 1;
answer[1] = 1;
for(int i = 2; i < n; i++){
answer[i] = answer[i-2] + answer[i-1];
}
return answer;
}
public static void main(String[] args) {
Main T = new Main();
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
for(int c : T.solution(n)){
System.out.print(c + " ");
}
}
}
*배열 사용 제한할 때
import java.util.ArrayList;
import java.util.Scanner;
class Main {
public void solution(int n) {
int a = 1, b = 1, c;
System.out.println(a +" "+ b + " ");
for(int i = 2; i < n; i++) {
c = a + b;
System.out.println(c + " ");
a = b;
b = c;
}
//2일 때 a = 1 b = 1 c = 2
//b가 a가 되어야하고 c가 b가 되어야함
//3일 때 a = 1 b = 2 c = 3
}
public static void main(String[] args) {
Main T = new Main();
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
T.solution(n);
}
}