t = int(input()) for _ in range(t): d,a = map(int,input().split()) X = list(map(int,input().split())) print(*[X[i] // A for i in range(d)])