#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, x, c = 0, a = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    x = x + c;
    a = x / m;
    c = x % m;
    cout << a << " ";
  }
  return 0;
}
