from decimal import Decimal, ROUND_HALF_UP t = int(input()) for i in range(t): n, A = map(int, input().split()) x = list(map(int, input().split())) for j in range(n): s = x[j] / A print(Decimal(str(s)).quantize(Decimal("0"), ROUND_HALF_UP), end=" ") print()