import java.math.BigDecimal; import java.math.RoundingMode; 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(); BigDecimal a = sc.nextBigDecimal(); BigDecimal[] x = new BigDecimal[d]; for (int i = 0; i < d; i++) { x[i] = sc.nextBigDecimal(); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < d; i++) { sb.append(x[i].divide(a, RoundingMode.HALF_UP).toPlainString()).append(' '); } sb.deleteCharAt(sb.length() - 1); System.out.println(sb.toString()); } sc.close(); } }