def solve(): n, d = map(int, input().split()) # Reads n and d numbers = list(map(int, input().split())) # Reads a line of numbers and splits them for x in numbers: print(round(x / d), end=' ') print() def main(): t = int(input()) # Reads the number of test cases while t > 0: solve() t -= 1 if __name__ == "__main__": main()