#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, c, tmp, lc, lp, sc, sp;
  cin >> n >> c;
  vector<int> a(n - 1);
  for (int i = 0; i < n - 1; ++i) cin >> a[i];
  cout << 0 << " ";
  cin >> tmp;
  lc = tmp + c;
  cout << min(lc, a[0]) << " ";
  lp = lc;
  sp = a[0];
  for (int i = 1; i < n - 1; ++i) {
    cin >> tmp;
    sc = min(sp, lp) + a[i];
    lc = min(lp, sp + c) + tmp;
    cout << min(sc, lc) << " ";
    sp = sc;
    lp = lc;
  }
  return 0;
}
