#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  int a;
  cin >> n >> m;
  int pre = m;
  int cnt = 0;
  while (n--) {
    cin >> a;
    cnt = 0;
    if (pre >= a) {
      pre -= a;
      if (pre == 0) {
        cnt++;
        pre = m;
      }
      cout << cnt << " ";
    } else if (pre == 0) {
      int div = a / m;
      int rem = a % m;
      pre = m - rem;
      cout << cnt + div << " ";
    } else {
      cnt++;
      a -= pre;
      int div = a / m;
      int rem = a % m;
      pre = m - rem;
      cout << cnt + div << " ";
    }
  }
  return 0;
}
