#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long m, l = 0, t;
  scanf("%d %ld", &n, &m);
  for (int a = 0; a < n; a++) {
    int a2;
    cin >> a2;
    l += a2;
    t = l / m;
    l %= m;
    printf("%ld ", t);
  }
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << "s.\n";
  return 0;
}
