def solve(): D, A = map(int, input().split()) X = list(map(int, input().split())) ans = [] for x in X: ans.append(int(x / A + 0.5)) print(*ans) T = int(input()) for _ in range(T): solve()