#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s[200001], m, mod = 0;
  cin >> n >> m;
  int ans[n + 1];
  for (int i = 1; i <= n; i++) cin >> s[i];
  for (int i = 1; i <= n; i++) {
    s[i] += mod;
    ans[i] = s[i] / m;
    mod = s[i] % m;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
