import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int z = 0; z < t; z++) { int d = sc.nextInt(); double a = sc.nextLong(); long[] x = new long[d]; for (int i = 0; i < d; i++) { x[i] = sc.nextLong(); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < d; i++) { sb.append(Math.round(x[i] / a)).append(' '); } sb.deleteCharAt(sb.length() - 1); System.out.println(sb.toString()); } sc.close(); } }