I=input for _ in"_"*int(I()):A=int(I().split()[-1]);print(*[round(int(i)/A)for i in I().split()])