#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, a[200002], k;
  cin >> n >> m;
  long long int free = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long int i = 0; i < n; i++) {
    k = (a[i] + free) / m;
    free = (a[i] + free) % m;
    cout << k << " ";
  }
  cout << endl;
}
