def round2(x): x = int(x * 10) if x % 10 >= 5: return x // 10 + 1 else: return x // 10 def fun(): d, a = map(int, input().split()) x = [*map(int, input().split())] return [int(round2(it / a)) for it in x] n = int(input()) for _ in range(n): print(*fun())