#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, a, left = 0, ret;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    if (i) {
      printf(" ");
    }
    scanf("%d", &a);
    if (a < left) {
      ret = 0;
      left -= a;
    } else {
      ret = left != 0;
      a -= left;
      ret += a / m;
      left = (a % m) ? (m - (a % m)) : 0;
    }
    printf("%d", ret);
  }
  return 0;
}
