#include using namespace std; using ll = long long; int D; ll A; void solve(){ cin >> D >> A; for(int i = 0;i < D;i++){ ll x; cin >> x; __int128_t p = (x % A) * 10 / A; cout << x / A + (p >= 5 ? 1 : 0) << " \n"[i + 1 == D]; } } int main(void){ ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--)solve(); return 0; }