from decimal import Decimal t = int(input()) for _ in range(t): d, a = map(int, input().split()) x = list(map(int, input().split())) p = [(Decimal(str(i))/Decimal(str(a))).quantize(Decimal('1')) for i in x] print(*p)