#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long a[200005];
int main() {
  scanf("%lld%lld", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  long long pre = 0;
  long long cnt = 0;
  for (int i = 1; i <= n; i++) {
    cnt = (a[i] + pre) / m;
    pre = (a[i] + pre) % m;
    printf("%lld ", cnt);
  }
  printf("\n");
}
