#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 100000 + 5;
int dp[N][2];
int n, c;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> c;
  dp[1][0] = 0;
  dp[1][1] = c;
  vector<int> arr(n + 1);
  vector<int> brr(n + 1);
  for (__typeof(n + 1) i = (2) - ((2) > (n + 1));
       i != (n + 1) - ((2) > (n + 1)); i += 1 - 2 * ((2) > (n + 1))) {
    cin >> arr[i];
  }
  for (__typeof(n + 1) i = (2) - ((2) > (n + 1));
       i != (n + 1) - ((2) > (n + 1)); i += 1 - 2 * ((2) > (n + 1)))
    cin >> brr[i];
  for (__typeof(n + 1) i = (2) - ((2) > (n + 1));
       i != (n + 1) - ((2) > (n + 1)); i += 1 - 2 * ((2) > (n + 1))) {
    dp[i][0] = arr[i] + min(dp[i - 1][0], dp[i - 1][1]);
    dp[i][1] = brr[i] + min(dp[i - 1][0] + c, dp[i - 1][1]);
  }
  for (__typeof(n + 1) i = (1) - ((1) > (n + 1));
       i != (n + 1) - ((1) > (n + 1)); i += 1 - 2 * ((1) > (n + 1))) {
    int res = min(dp[i][0], dp[i][1]);
    if (i == 1)
      cout << 0 << " ";
    else
      cout << res << " ";
  }
  return 0;
}
