from math import floor


def round2(x):
    x = int(floor(x * 10))
    if x % 10 >= 5:
        return x // 10 + 1
    else:
        return x // 10


def fun():
    _, a = map(float, input().split())
    x = [*map(float, input().split())]
    return [round2(it / a) for it in x]


n = int(input())
for _ in range(n):
    print(*fun())