for _ in range(int(input())): D,A = map(int,input().split()) X = list(map(int,input().split())) print(*[int(x/A+0.5) for x in X])