def solve()->None: d, a = map(int, input().split()) x = list(map(int, input().split())) x = list(map(lambda x: int(x/a+0.5), x)) for i in x: print(i, end=" ") print("") def main() -> None: t = int(input()) for i in range(t): solve() if __name__ == "__main__": main()