#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, m;
  cin >> n >> m;
  int a[n];
  int i;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  int temp = 0;
  int result[n];
  for (i = 0; i < n; i++) {
    temp += a[i];
    if (temp < m) {
      result[i] = 0;
    } else {
      result[i] = temp / m;
      temp = temp % m;
    }
  }
  for (i = 0; i < n; i++) {
    cout << result[i] << " ";
  }
}
