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