#include <bits/stdc++.h>
using namespace std;
int n, m, ko, a, z;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    ko = 0;
    cin >> a;
    a += z;
    ko += a / m;
    z = a % m;
    cout << ko << " ";
  }
  return 0;
}
