def round_int(x): return int(x) + ((x - int(x)) >= 0.5) t = int(input()) for i in range(t): d, a = map(int, input().split()) x = list(map(int, input().split())) x = list(str(round_int(x1 / a)) for x1 in x) print(" ".join(x)[0:])