import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int M = sc.nextInt(); long[] array = new long[N]; for(int i = 0; i < N; i++){ array[i] = sc.nextLong(); } for(int i = 0; i < M; i++){ System.out.print((i == 0 ? "" : " ") + (array[i])); } System.out.println(); } }