for _ in range(int(input())): d,a = map(int,input().split()) ls = list(map(int,input().split())) lz = [] for i in ls: lz.append(int((i+a/2)//a)) print(*lz)