import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class No1021 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); List room = new ArrayList<>(); for (int i=0;i1) { room.set((room.size() - 2), (room.get(room.size() - 1) + room.get(room.size() - 2))); room.remove(room.size() - 1); } } }else{ if (posStart>0) { posStart--; } if(posMin>0){ posMin--; }else{ if(room.size()>1) { room.set(1, (room.get(0) + room.get(1))); room.remove(0); } } if(posMax>0){ posMax--; } } } if (posStart==0) { System.out.print(room.get(0)); room.remove(0); } else { System.out.print("0"); } for (int i=1;ii) { System.out.print(" 0"); } else { if (room.size()>0) { System.out.print(" "); System.out.print(room.get(0)); room.remove(0); } else { System.out.print(" 0"); } } } System.out.println(""); } }