T=int(input()) for _ in range(T): D,A=map(int,input().split()) X=list(map(int,input().split())) for i in range(D): X[i]=(X[i]+A//2+1)//A print(*X)