T = int(input()) for i in range(T): D, A = map(int, input().split(' ')) X = list(map(int, input().split(' '))) print(' '.join([str(int(j/A+0.5)) for j in X]))