import sys input = sys.stdin.readline T=int(input()) for tests in range(T): D,A=map(int,input().split()) X=list(map(int,input().split())) ANS=[round(X[i]/A) for i in range(D)] print(*ANS)