package main import ( "bufio" "fmt" "math" "os" "strconv" "strings" ) var sc = bufio.NewScanner(os.Stdin) var wr = bufio.NewWriter(os.Stdout) func next() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(next()) return i } func nextFloat() float64 { f, _ := strconv.ParseFloat(next(), 64) return f } func nextInts(n int) []int { ret := make([]int, n) for i := 0; i < n; i++ { ret[i] = nextInt() } return ret } func nextFloats(n int) []float64 { ret := make([]float64, n) for i := 0; i < n; i++ { ret[i] = nextFloat() } return ret } func nextStrings(n int) []string { ret := make([]string, n) for i := 0; i < n; i++ { ret[i] = next() } return ret } func main() { sc.Split(bufio.ScanWords) var t = nextInt() type c struct { d int a float64 x []int } cc := make([]c, t) for i := 0; i < t; i++ { cc[i].d = nextInt() cc[i].a = nextFloat() cc[i].x = nextInts(cc[i].d) } for j := 0; j < t; j++ { out := make([]string, cc[j].d) for k := 0; k < cc[j].d; k++ { out[k] = strconv.FormatFloat(math.Round(float64(cc[j].x[k])/cc[j].a), 'f', -1, 64) } fmt.Println(strings.Join(out, " ")) } }