t=int(input()) for i in range(t): d,a=map(int,input().split()) x=list(map(int,input().split())) p=[] for j in range(d): p.append(x[i]//a+(x[i]%a>=(a+1)//2)) print(*p)