#include <bits/stdc++.h>
using namespace std;
template <typename U, typename V>
void Min(U &a, const V &b) {
  if (a > b) a = b;
}
template <typename U, typename V>
void Max(U &a, const V &b) {
  if (a < b) a = b;
}
template <typename U, typename V>
void add(U &a, const V &b) {
  a = (a + b) % 1000000007;
}
template <typename U>
U gcd(U a, U b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a >= b)
    return gcd(a % b, b);
  else
    return gcd(a, b % a);
}
int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1LL * ans * a % 1000000007;
    a = 1LL * a * a % 1000000007;
    b >>= 1;
  }
  return ans;
}
int pow(int a, int b, int c) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1LL * ans * a % c;
    a = 1LL * a * a % c;
    b >>= 1;
  }
  return ans;
}
int a[200005], b[200005];
int main() {
  int T, i, j, k, m, ca = 0, n, K;
  scanf("%d%d", &n, &K);
  for (int i = 0; i < n - 1; i++) scanf("%d", &a[i + 1]), a[i + 1] += a[i];
  for (int i = 0; i < n - 1; i++) scanf("%d", &b[i + 1]), b[i + 1] += b[i];
  int p = 0, q = K;
  printf("0 ");
  for (int i = 1; i < n; i++) {
    k = min(p + a[i], q + b[i]);
    printf("%d ", k);
    Min(p, k - a[i]);
    Min(q, k - b[i] + K);
  }
  puts("");
}
