#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  int res = 0, cur = 0, tmp;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    res = (cur + tmp) / m;
    cur = (cur + tmp) % m;
    cout << res << ' ';
  }
}
