#include <bits/stdc++.h>
using namespace std;
void solution() {
  int n, m, s = 0;
  cin >> n >> m;
  for (int i = 0, a; i < n; i++) {
    cin >> a;
    s += a;
    cout << s / m << " ";
    s %= m;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solution();
    cout << "\n";
  }
  return 0;
}
