import java.util.Scanner;
import java.util.TreeMap;
import java.util.Iterator;
import java.util.Map;
public class Main{
// 用于存储n/k的值
public static int nlk;
// 利用表存储数据
public static Map<Integer, Integer> map;
// 数据初始化
public static void init(){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
nlk = n / k;
map = new TreeMap<Integer, Integer>();
int temp;
Object target;
for(int i=0; i<n; i++){
temp = scan.nextInt();