#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, m;
  int num[200001];
  while (cin >> n >> m) {
    for (int i = 0; i < n; i++) cin >> num[i];
    for (int i = 0; i < n; i++) {
      cout << num[i] / m << " ";
      num[i + 1] += num[i] % m;
    }
    cout << endl;
  }
  return 0;
}
