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