t = int(input()) for _ in range(t): n, A = map(int, input().split()) x = map(int, input().split()) y = [(i * 2 + A) // (A * 2) for i in x] for i in y: print(i, end = ' ') print()