#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  long long n, taille;
  cin >> n >> taille;
  long long reste = 0;
  for (long long i = 0; i < n; i++) {
    long long nb;
    cin >> nb;
    reste += nb;
    long long total = reste / taille;
    cout << total << ' ';
    reste %= taille;
  }
}
