#include <bits/stdc++.h>
int main() {
  int n, m, i, pre = 0;
  scanf("%d %d", &n, &m);
  int a[n + 2];
  int times[n + 2];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < n; i++) {
    times[i] = (pre + a[i]) / m;
    pre = (pre + a[i]) % m;
  }
  for (i = 0; i < n; i++) {
    printf("%d ", times[i]);
  }
  return 0;
}
