#include using namespace std; using ll = long long; int D; ll A; ll X[110]; void solve(){ cin >> D >> A; for(int i = 0;i < D;i++)cin >> X[i]; for(int i = 0;i < D;i++){ ll p = (X[i] - X[i] / A * A) * 10; ll q = p / A; cout << X[i] / A + (q >= 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; }