a=int(input()) d=[] for i in range(a): b=list(map(int, input().split())) c=list(map(int, input().split())) for j in range(b[0]): d.append(int(round(c[j]/b[1],0))) print(*d) d.clear()