#include <bits/stdc++.h>
using namespace std;
int n, m, tmp, t;
void setup() {}
void solve() {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> tmp;
    t += tmp;
    cout << t / m << ' ';
    t %= m;
  }
}
int main() {
  setup();
  solve();
  return 0;
}
