T = int(input()) for _ in range(T): D, A = map(int, input().split()) X = list(map(int, input().split())) ans = [None]*D for i in range(D): ans[i] = X[i]//A if not ans[i]+0.5 > X[i]/A: ans[i] += 1 print(*ans)