for i in range(int(input())): d,a = map(int,input().split()) ls = list(map(int,input().split())) for j in ls: print(int(j/a+0.5), end=" ") print("")