import sys sys.set_int_max_str_digits(0) T = int(input()) for _ in range(T): D, A = list(map(int, input().split())) X = list(map(int, input().split())) ans = [] for x in X: ans.append(int(x/A+0.5)) print(" ".join(map(str, ans)))