t = int(input()) for i in range(t): d, a = map(int, input().split()) x = list(map(int, input().split())) x = list(str(round(x1 / a)) for x1 in x) print(" ".join(x)[0:])