import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.*;
import java.io.*;
import java.math.*;
public class Main6{

static class Pair
    {
        int x;
        int y;
		int z;
		int d;
        public Pair(int x,int y,int z,int d)
        {
            this.x= x;
            this.y= y;
			this.z=z;
			this.d=d;
        }

    @Override
            public int hashCode()
            {
                final int temp = 14;
                int ans = 1;
                ans =x*31+y*13;
                return ans;
            }

            // Equal objects must produce the same
            // hash code as long as they are equal
        @Override
        public boolean equals(Object o)
        {
            if (this == o) {
                return true;
            }
            if (o == null) {
                return false;
            }
            if (this.getClass() != o.getClass()) {
                return false;
            }
            Pair other = (Pair)o;
            if (this.x != other.x || this.y!=other.y) {
                return false;
            }
            return true;
        }

    }
    static class Pair1
    {
        String x;
        int y;
        int z;

    }
    static class Compare
    {
        static void compare(Pair arr[], int n)
        {
            // Comparator to sort the pair according to second element
            Arrays.sort(arr, new Comparator<Pair>() {
                @Override public int compare(Pair p1, Pair p2)
                {
                    if(p1.x>p2.x)
                    {
                        return 1;
                    }
                    else if(p1.x<p2.x)
                    {
                        return -1;
                    }
                    else
                    {
                        if(p1.y>p2.y)
						{
							return 1;
						}
						else if(p1.y<p2.y)
						{
							return -1;
						}
						else
						{
							if(p1.z>p2.z)
							{
								return 1;
							}
							else if(p1.z<p2.z)
							{
								return -1;
							}
							else
								return 0;
						}
                    }
                }
            });
        }

    }

    public static long pow(long a, long b)
    {
        long result=1;
        while(b>0)
        {
            if (b % 2 != 0)
            {
                result=(result*a)%1000000007;
                b--;
            }
            a=(a*a)%1000000007;
            b /= 2;
        }
        return result;
    }
    public static long fact(long num)
    {
                long value=1;
                int i=0;
                for(i=2;i<num;i++)
                {
                    value=((value%mod)*i%mod)%mod;
                }
                return value;
            }
            public static long gcd(long a, long b)
            {
                if (a == 0)
                    return b;
                return gcd(b%a, a);
            }

    /*        public static long lcm(long a,long b)
            {
                return a * (b / gcd(a, b));
            }
        */    public static long sum(int h)
            {
                return (h*(h+1)/2);
            }
        /*   public static void dfs(int parent,boolean[] visited,int[] dp)
            {
                ArrayList<Integer> arr=new ArrayList<Integer>();
                arr=graph.get(parent);
                visited[parent]=true;
                for(int i=0;i<arr.size();i++)
                {
                    int num=(int)arr.get(i);
                    if(visited[num]==false)
                    {
                        dfs(num,visited,dp);
                    }
                    dp[parent]=Math.max(dp[num]+1,dp[parent]);
                }
            }
        //    static int flag1=0;
            static int[] dis;*/
            static int mod=1000000007;
            static ArrayList<ArrayList<Integer>> graph;
            static ArrayList<ArrayList<Integer>> g;

       /*    public static void bfs(int num,int size)
            {
                boolean[] visited=new boolean[size+1];
                Queue<Integer> q=new LinkedList<>();
                q.add(num);
                ans[num]=1;
                visited[num]=true;
                while(!q.isEmpty())
                {
                    int x=q.poll();
                    ArrayList<Integer> al=graph.get(x);
                    for(int i=0;i<al.size();i++)
                    {
                        int y=al.get(i);
                        if(visited[y]==false)
                        {
                            q.add(y);
                            ans[y]=ans[x]+1;
                            visited[y]=true;
                        }
                    }
                }
            }
            static int[] ans;*/

        //    static int[] a;
            public static int[] sort(int[] a)
            {
                int n=a.length;
                ArrayList<Integer> ar=new ArrayList<>();
                for(int i=0;i<a.length;i++)
                {
                    ar.add(a[i]);
                }
                Collections.sort(ar);
                for(int i=0;i<n;i++)
                {
                    a[i]=ar.get(i);
                }
                return a;
            }
			static class pqcomparator implements Comparator<Pair>
			{
				public int compare(Pair p1 ,Pair p2)
				{
					if(p1.y>p2.y)
					{
						return -1;
					}
					else
						return 1;
				}
			}
			public static void dfs(int parent,boolean[] visited)
            {
                ArrayList<Integer> arr=new ArrayList<Integer>();
                arr=graph.get(parent);
                visited[parent]=true;
				ar.add(parent);
				count++;
				for(int i=0;i<arr.size();i++)
                {
					int num=(int)arr.get(i);
                    if(visited[num]==false)
                    {
						dfs(num,visited);
                    }
            	 }
            }
			static int count=0;
			static ArrayList<Integer> ar;
			static public void main(String args[])throws IOException
            {
				int t=1;
				StringBuilder sb=new StringBuilder();
				while(t-->0)
				{
					int n=i();
					int c=i();
					int[] a=new int[n-1];
					int[] sum=new int[n-1];
					for(int i=0;i<n-1;i++)
					{
						a[i]=i();
					}
					sum[0]=a[0];
					for(int i=1;i<n-1;i++)
					{
						sum[i]=sum[i-1]+a[i];
					}
					int[] b=new int[n-1];
					int[] diff=new int[n-1];
					for(int i=0;i<n-1;i++)
					{
						b[i]=i();
					}
					diff[0]=b[0];
					for(int i=1;i<n-1;i++)
					{
						diff[i]=diff[i-1]+b[i];
					}
					int[] dp=new int[n];
					dp[0]=0;
					boolean stairs=false,ele=false;
					if(b[0]+c>a[0])
					{
						stairs=true;
					}
					else if(b[0]+c==a[0])
					{
						ele=true;
						stairs=true;
					}
					else
						ele=true;
					dp[1]=Math.min(b[0]+c,a[0]);
					int flag=0;
					if(ele==true)
					{
						flag=1;
					}
					for(int i=2;i<n;i++)
					{
						if(stairs==true && ele==true)
						{
							if(a[i-1]<b[i-1])
							{
								dp[i]=dp[i-1]+a[i-1];
								flag=0;
								ele=false;
							}
							else if(a[i-1]>b[i-1])
							{
								dp[i]=dp[i-1]+b[i-1];
								flag=1;
								stairs=false;
							}
							else
							{
								dp[i]=dp[i-1]+b[i-1];
								flag=1;
								stairs=false;
								ele=true;
							}
						}
						else if(stairs==true)
						{
							if(flag==1)
							{
								if(a[i-1]<b[i-1])
								{
									dp[i]=dp[i-1]+a[i-1];
									flag=0;
									ele=false;
								}
								else if(a[i-1]>b[i-1])
								{
									dp[i]=dp[i-1]+b[i-1];
									stairs=false;
									ele=true;
									flag=1;
								}
								else
								{
									dp[i]=dp[i-1]+a[i-1];
									flag=1;
									ele=true;
								}
							}
							else
							{
								if(a[i-1]<b[i-1]+c)
								{
									dp[i]=dp[i-1]+a[i-1];
									ele=false;
									flag=0;
									stairs=true;
								}
								else if(a[i-1]>b[i-1]+c)
								{
									dp[i]=dp[i-1]+b[i-1]+c;
									flag=1;
									stairs=false;
									ele=true;
								}
								else
								{
									dp[i]=dp[i-1]+b[i-1]+c;
									ele=true;
									stairs=false;
									flag=1;
								}
							}
						}
						else
						{
							if(a[i-1]<b[i-1])
							{
								dp[i]=dp[i-1]+a[i-1];
								flag=0;
								ele=false;
								stairs=true;
							}
							else if(a[i-1]>b[i-1])
							{
								dp[i]=dp[i-1]+b[i-1];
								stairs=false;
								flag=1;
								ele=true;
							}
							else
							{
								dp[i]=dp[i-1]+b[i-1];
								flag=1;
								ele=true;
							}
						}
					}
					for(int i=0;i<n;i++)
					{
						sb.append(dp[i]+" ");
					}
					sb.append("\n");
				}
				System.out.print(sb.toString());
			}
			static boolean areParenthesisBalanced(char exp[])
			{
			   Stack<Character> st=new Stack<>();
			   for(int i=0;i<exp.length;i++)
			   {
					if (exp[i] == '(')
						st.push(exp[i]);
					if (exp[i] == ')')
					{
						if (st.isEmpty())
						{
						   return false;
						}
						else if ( !isMatchingPair(st.pop(), exp[i]) )
						{
						   return false;
						}
					}

				}
				if (st.isEmpty())
					return true;
				else
				 {
					 return false;
				 }
			}
			static boolean isMatchingPair(char character1, char character2)
			{
			   if (character1 == '(' && character2 == ')')
				 return true;
			   else
				 return false;
			}
            /**/
            static InputReader in=new InputReader(System.in);
                static OutputWriter out=new OutputWriter(System.out);
                public static long l()
                {
                    String s=in.String();
                    return Long.parseLong(s);
                }
                public static void pln(String value)
                {
                    System.out.println(value);
                }
                public static int i()
                {
                    return in.Int();
                }
                public static String s()
                {
                    return in.String();
                }
    }

        class InputReader {

            private InputStream stream;
            private byte[] buf = new byte[1024];
            private int curChar;
            private int numChars;
            private SpaceCharFilter filter;

            public InputReader(InputStream stream) {
                this.stream = stream;
            }

            public int read() {
                if (numChars== -1)
                    throw new InputMismatchException();
                if (curChar >= numChars) {
                    curChar = 0;
                    try {
                        numChars = stream.read(buf);
                    } catch (IOException e) {
                        throw new InputMismatchException();
                    }
                    if (numChars <= 0)
                        return -1;
                }
                return buf[curChar++];
            }

            public int Int() {
                int c = read();
                while (isSpaceChar(c))
                    c = read();
                int sgn = 1;
                if (c == '-') {
                    sgn = -1;
                    c = read();
                }
                int res = 0;
                do {
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    res *= 10;
                    res += c - '0';
                    c = read();
                } while (!isSpaceChar(c));
                return res * sgn;
            }

            public String String() {
                int c = read();
                while (isSpaceChar(c))
                    c = read();
                StringBuilder res = new StringBuilder();
                do {
                    res.appendCodePoint(c);
                    c = read();
                } while (!isSpaceChar(c));
                return res.toString();
            }

            public boolean isSpaceChar(int c) {
                if (filter != null)
                    return filter.isSpaceChar(c);
                return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
            }

            public String next() {
                return String();
            }

            public interface SpaceCharFilter {
                public boolean isSpaceChar(int ch);
            }
        }

        class OutputWriter {
            private final PrintWriter writer;

            public OutputWriter(OutputStream outputStream) {
                writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
            }

            public OutputWriter(Writer writer) {
                this.writer = new PrintWriter(writer);
            }

            public void print(Object...objects) {
                for (int i = 0; i < objects.length; i++) {
                    if (i != 0)
                        writer.print(' ');
                    writer.print(objects[i]);
                }
            }

            public void printLine(Object...objects) {
                print(objects);
                writer.println();
            }

            public void close() {
                writer.close();
            }

            public void flush() {
                writer.flush();
            }

            }

            class IOUtils {

            public static int[] readIntArray(InputReader in, int size) {
                int[] array = new int[size];
                for (int i = 0; i < size; i++)
                    array[i] = in.Int();
                return array;
            }

            }


import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.io.*;
import java.math.*;
public class Main7
{
	static class Pair
	{
		int x;
		int y;
		Pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}
	}
	static int mod=1000000007;
	public static int[] sort(int[] a)
	{
		int n=a.length;
		ArrayList<Integer> ar=new ArrayList<>();
		for(int i=0;i<a.length;i++)
		{
			ar.add(a[i]);
		}
		Collections.sort(ar);
		for(int i=0;i<n;i++)
		{
			a[i]=ar.get(i);
		}
		return a;
	}
	public static int pow(int a, int b)
    {
        int result=1;
        while(b>0)
        {
            if (b % 2 != 0)
            {
                result=(result*a);
                b--;
            }
            a=(a*a);
            b /= 2;
        }
        return result;
    }

    public static long gcd(long a, long b)
    {
        if (a == 0)
            return b;
        return gcd(b%a, a);
    }
	public static long lcm(long a, long b)
	{
		return a*(b/gcd(a,b));
	}
	static ArrayList<ArrayList<Integer>> graph;
	static public void main(String args[])throws IOException
	{
		int tt=1;
		StringBuilder sb=new StringBuilder();
		for(int ttt=1;ttt<=tt;ttt++)
		{
			int n=i();
			int c=i();
			int[] a=new int[n-1];
			for(int i=0;i<n-1;i++)
			{
				a[i]=i();
			}
			int[] b=new int[n-1];
			for(int i=0;i<n-1;i++)
			{
				b[i]=i();
			}
			int[][] dp=new int[n][2];
			dp[0][0]=0;
			dp[0][0]=0;
			dp[1][0]=a[0];
			dp[1][1]=b[0]+c;
			for(int i=2;i<n;i++)
			{
				dp[i][0]=Math.min(dp[i-1][0],dp[i-1][1])+a[i-1];
				dp[i][1]=Math.min(dp[i-1][1]+b[i-1],dp[i-1][0]+c+b[i-1]);
			}
			for(int i=0;i<n;i++)
			{
				sb.append(Math.min(dp[i][0],dp[i][1])+" ");
			}
			sb.append("\n");
		}
		System.out.print(sb.toString());
	}
	/**/
	static InputReader in=new InputReader(System.in);
	static OutputWriter out=new OutputWriter(System.out);
	public static long l()
	{
		String s=in.String();
		return Long.parseLong(s);
	}
	public static void pln(String value)
	{
		System.out.println(value);
	}
	public static int i()
	{
		return in.Int();
	}
	public static String s()
	{
		return in.String();
	}
}
	class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars== -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int Int() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String String() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next() {
			return String();
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object...objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object...objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

		}

		class IOUtils {

		public static int[] readIntArray(InputReader in, int size) {
			int[] array = new int[size];
			for (int i = 0; i < size; i++)
				array[i] = in.Int();
			return array;
		}

	}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.*;
import java.io.*;
import java.math.*;
public class Main6{

static class Pair
    {
        int x;
        int y;
		int z;
		int d;
        public Pair(int x,int y,int z,int d)
        {
            this.x= x;
            this.y= y;
			this.z=z;
			this.d=d;
        }

    @Override
            public int hashCode()
            {
                final int temp = 14;
                int ans = 1;
                ans =x*31+y*13;
                return ans;
            }

            // Equal objects must produce the same
            // hash code as long as they are equal
        @Override
        public boolean equals(Object o)
        {
            if (this == o) {
                return true;
            }
            if (o == null) {
                return false;
            }
            if (this.getClass() != o.getClass()) {
                return false;
            }
            Pair other = (Pair)o;
            if (this.x != other.x || this.y!=other.y) {
                return false;
            }
            return true;
        }

    }
    static class Pair1
    {
        String x;
        int y;
        int z;

    }
    static class Compare
    {
        static void compare(Pair arr[], int n)
        {
            // Comparator to sort the pair according to second element
            Arrays.sort(arr, new Comparator<Pair>() {
                @Override public int compare(Pair p1, Pair p2)
                {
                    if(p1.x>p2.x)
                    {
                        return 1;
                    }
                    else if(p1.x<p2.x)
                    {
                        return -1;
                    }
                    else
                    {
                        if(p1.y>p2.y)
						{
							return 1;
						}
						else if(p1.y<p2.y)
						{
							return -1;
						}
						else
						{
							if(p1.z>p2.z)
							{
								return 1;
							}
							else if(p1.z<p2.z)
							{
								return -1;
							}
							else
								return 0;
						}
                    }
                }
            });
        }

    }

    public static long pow(long a, long b)
    {
        long result=1;
        while(b>0)
        {
            if (b % 2 != 0)
            {
                result=(result*a)%1000000007;
                b--;
            }
            a=(a*a)%1000000007;
            b /= 2;
        }
        return result;
    }
    public static long fact(long num)
    {
                long value=1;
                int i=0;
                for(i=2;i<num;i++)
                {
                    value=((value%mod)*i%mod)%mod;
                }
                return value;
            }
            public static long gcd(long a, long b)
            {
                if (a == 0)
                    return b;
                return gcd(b%a, a);
            }

    /*        public static long lcm(long a,long b)
            {
                return a * (b / gcd(a, b));
            }
        */    public static long sum(int h)
            {
                return (h*(h+1)/2);
            }
        /*   public static void dfs(int parent,boolean[] visited,int[] dp)
            {
                ArrayList<Integer> arr=new ArrayList<Integer>();
                arr=graph.get(parent);
                visited[parent]=true;
                for(int i=0;i<arr.size();i++)
                {
                    int num=(int)arr.get(i);
                    if(visited[num]==false)
                    {
                        dfs(num,visited,dp);
                    }
                    dp[parent]=Math.max(dp[num]+1,dp[parent]);
                }
            }
        //    static int flag1=0;
            static int[] dis;*/
            static int mod=1000000007;
            static ArrayList<ArrayList<Integer>> graph;
            static ArrayList<ArrayList<Integer>> g;

       /*    public static void bfs(int num,int size)
            {
                boolean[] visited=new boolean[size+1];
                Queue<Integer> q=new LinkedList<>();
                q.add(num);
                ans[num]=1;
                visited[num]=true;
                while(!q.isEmpty())
                {
                    int x=q.poll();
                    ArrayList<Integer> al=graph.get(x);
                    for(int i=0;i<al.size();i++)
                    {
                        int y=al.get(i);
                        if(visited[y]==false)
                        {
                            q.add(y);
                            ans[y]=ans[x]+1;
                            visited[y]=true;
                        }
                    }
                }
            }
            static int[] ans;*/

        //    static int[] a;
            public static int[] sort(int[] a)
            {
                int n=a.length;
                ArrayList<Integer> ar=new ArrayList<>();
                for(int i=0;i<a.length;i++)
                {
                    ar.add(a[i]);
                }
                Collections.sort(ar);
                for(int i=0;i<n;i++)
                {
                    a[i]=ar.get(i);
                }
                return a;
            }
			static class pqcomparator implements Comparator<Pair>
			{
				public int compare(Pair p1 ,Pair p2)
				{
					if(p1.y>p2.y)
					{
						return -1;
					}
					else
						return 1;
				}
			}
			public static void dfs(int parent,boolean[] visited)
            {
                ArrayList<Integer> arr=new ArrayList<Integer>();
                arr=graph.get(parent);
                visited[parent]=true;
				ar.add(parent);
				count++;
				for(int i=0;i<arr.size();i++)
                {
					int num=(int)arr.get(i);
                    if(visited[num]==false)
                    {
						dfs(num,visited);
                    }
            	 }
            }
			static int count=0;
			static ArrayList<Integer> ar;
			static public void main(String args[])throws IOException
            {
				int t=1;
				StringBuilder sb=new StringBuilder();
				while(t-->0)
				{
					int n=i();
					int c=i();
					int[] a=new int[n-1];
					int[] sum=new int[n-1];
					for(int i=0;i<n-1;i++)
					{
						a[i]=i();
					}
					int[] b=new int[n-1];
					for(int i=0;i<n-1;i++)
					{
						b[i]=i();
					}
					long[] dp=new long[n];
					dp[0]=0;
					boolean stairs=false,ele=false;
					if(b[0]+c>a[0])
					{
						stairs=true;
					}
					else if(b[0]+c==a[0])
					{
						ele=true;
					}
					else
						ele=true;
					dp[1]=Math.min(b[0]+c,a[0]);
					int flag=0;
					if(ele==true)
					{
						flag=1;
					}
					for(int i=2;i<n;i++)
					{
						if(stairs==true)
						{
							if(a[i-1]<b[i-1]+c)
							{
								dp[i]=dp[i-1]+a[i-1];
								ele=false;
								flag=0;
								stairs=true;
							}
							else if(a[i-1]>b[i-1]+c)
							{
								dp[i]=dp[i-1]+b[i-1]+c;
								flag=1;
								stairs=false;
								ele=true;
							}
							else
							{
								dp[i]=dp[i-1]+b[i-1]+c;
								ele=true;
								stairs=false;
								flag=1;
							}
						}
						else if(ele==true)
						{
							if(a[i-1]<b[i-1])
							{
								dp[i]=dp[i-1]+a[i-1];
								flag=0;
								ele=false;
								stairs=true;
							}
							else if(a[i-1]>b[i-1])
							{
								dp[i]=dp[i-1]+b[i-1];
								stairs=false;
								flag=1;
								ele=true;
							}
							else
							{
								dp[i]=dp[i-1]+b[i-1];
								flag=1;
								ele=true;
								stairs=false;
							}
						}
					}
					for(int i=0;i<n;i++)
					{
						sb.append(dp[i]+" ");
					}
					sb.append("\n");
				}
				System.out.print(sb.toString());
			}
			static boolean areParenthesisBalanced(char exp[])
			{
			   Stack<Character> st=new Stack<>();
			   for(int i=0;i<exp.length;i++)
			   {
					if (exp[i] == '(')
						st.push(exp[i]);
					if (exp[i] == ')')
					{
						if (st.isEmpty())
						{
						   return false;
						}
						else if ( !isMatchingPair(st.pop(), exp[i]) )
						{
						   return false;
						}
					}

				}
				if (st.isEmpty())
					return true;
				else
				 {
					 return false;
				 }
			}
			static boolean isMatchingPair(char character1, char character2)
			{
			   if (character1 == '(' && character2 == ')')
				 return true;
			   else
				 return false;
			}
            /**/
            static InputReader in=new InputReader(System.in);
                static OutputWriter out=new OutputWriter(System.out);
                public static long l()
                {
                    String s=in.String();
                    return Long.parseLong(s);
                }
                public static void pln(String value)
                {
                    System.out.println(value);
                }
                public static int i()
                {
                    return in.Int();
                }
                public static String s()
                {
                    return in.String();
                }
    }

        class InputReader {

            private InputStream stream;
            private byte[] buf = new byte[1024];
            private int curChar;
            private int numChars;
            private SpaceCharFilter filter;

            public InputReader(InputStream stream) {
                this.stream = stream;
            }

            public int read() {
                if (numChars== -1)
                    throw new InputMismatchException();
                if (curChar >= numChars) {
                    curChar = 0;
                    try {
                        numChars = stream.read(buf);
                    } catch (IOException e) {
                        throw new InputMismatchException();
                    }
                    if (numChars <= 0)
                        return -1;
                }
                return buf[curChar++];
            }

            public int Int() {
                int c = read();
                while (isSpaceChar(c))
                    c = read();
                int sgn = 1;
                if (c == '-') {
                    sgn = -1;
                    c = read();
                }
                int res = 0;
                do {
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    res *= 10;
                    res += c - '0';
                    c = read();
                } while (!isSpaceChar(c));
                return res * sgn;
            }

            public String String() {
                int c = read();
                while (isSpaceChar(c))
                    c = read();
                StringBuilder res = new StringBuilder();
                do {
                    res.appendCodePoint(c);
                    c = read();
                } while (!isSpaceChar(c));
                return res.toString();
            }

            public boolean isSpaceChar(int c) {
                if (filter != null)
                    return filter.isSpaceChar(c);
                return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
            }

            public String next() {
                return String();
            }

            public interface SpaceCharFilter {
                public boolean isSpaceChar(int ch);
            }
        }

        class OutputWriter {
            private final PrintWriter writer;

            public OutputWriter(OutputStream outputStream) {
                writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
            }

            public OutputWriter(Writer writer) {
                this.writer = new PrintWriter(writer);
            }

            public void print(Object...objects) {
                for (int i = 0; i < objects.length; i++) {
                    if (i != 0)
                        writer.print(' ');
                    writer.print(objects[i]);
                }
            }

            public void printLine(Object...objects) {
                print(objects);
                writer.println();
            }

            public void close() {
                writer.close();
            }

            public void flush() {
                writer.flush();
            }

            }

            class IOUtils {

            public static int[] readIntArray(InputReader in, int size) {
                int[] array = new int[size];
                for (int i = 0; i < size; i++)
                    array[i] = in.Int();
                return array;
            }

            }


import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class ProblemE {

    public static InputStream inputStream = System.in;

    public static OutputStream outputStream = System.out;

    public static void main(String[] args) {
        MyScanner scanner = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int n = scanner.nextInt();
        int c = scanner.nextInt();
        List<Integer> a = new ArrayList<>();
        List<Integer> b = new ArrayList<>();

        for (int i = 0; i < n - 1; i++) {
            a.add(scanner.nextInt());
        }
        for (int i = 0; i < n - 1; i++) {
            b.add(scanner.nextInt());
        }

        int[][] dp = new int[n + 1][2];

        dp[1][0] = a.get(0);
        dp[1][1] = c + b.get(0);

        for (int i = 2; i < n; i++) {
            dp[i][0] = Math.min(dp[i - 1][0], dp[i - 1][1]) + a.get(i - 1);
            dp[i][1] = Math.min(dp[i - 1][0] + c + b.get(i - 1), dp[i - 1][1] + b.get(i - 1));
        }

        for (int i = 0; i < n; i++) {
            out.print(Math.min(dp[i][0], dp[i][1]) + " ");
        }

        out.flush();
    }

    private static class MyScanner {
        private BufferedReader bufferedReader;
        private StringTokenizer stringTokenizer;

        private MyScanner(InputStream inputStream) {
            bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
        }

        private String next() {
            while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
                try {
                    stringTokenizer = new StringTokenizer(bufferedReader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return stringTokenizer.nextToken();
        }

        private int nextInt() {
            return Integer.parseInt(next());
        }

        private long nextLong() {
            return Long.parseLong(next());
        }

        private double nextDouble() {
            return Double.parseDouble(next());
        }

        private String nextLine() {
            String str = "";
            try {
                str = bufferedReader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    private static class Pair<F, S> {

        private F first;

        private S second;

        public Pair() {
        }

        public Pair(F first, S second) {
            this.first = first;
            this.second = second;
        }
    }

    private static class Triple<F, S, T> {

        private F first;

        private S second;

        private T third;

        public Triple() {
        }

        public Triple(F first, S second, T third) {
            this.first = first;
            this.second = second;
            this.third = third;
        }
    }
}


//package com.company;
import java.io.*;
import java.util.*;
import java.math.*;

public class Main{
    public static void main(String[] args)throws Exception {
        Scanner s = new Scanner(System.in);StringBuilder sb=new StringBuilder();
   int n=s.nextInt(); int k=s.nextInt();
  int[] a=new int[n];int[] b=new int[n];
   for(int i=0;i<n-1;i++){
       a[i]=s.nextInt();
   }for(int i=0;i<n-1;i++){
            b[i]=s.nextInt();
        }int preliye=0;int pre=0;int[][] ans=new int[n][2];
        for(int i=0;i<n;i++){
            sb.append(Math.min(ans[i][0],ans[i][1])+" ");
            if(i==n-1) break;
            ans[i+1][0]=Math.min(ans[i][0]+a[i],(ans[i][1]+a[i]));

            if(ans[i][1]!=0)   ans[i+1][1]=Math.min(ans[i][1]+b[i],(ans[i][0]+b[i]+k));
            else ans[i+1][1]=ans[i][0]+b[i]+k;
           // ans[i][0]=Math.min( ans[i-1][0]+a[i],Math.min(ans[i-1][0]+b[i]+k,(ans[i-1][1])));
        }
        System.out.println(sb.toString());
}}


//vpackage com.company;
import java.io.*;
import java.util.*;
import java.math.*;

public class Main{
    public static void main(String[] args)throws Exception {
        Scanner s = new Scanner(System.in);StringBuilder sb=new StringBuilder();
   int n=s.nextInt(); int k=s.nextInt();
  int[] a=new int[n];int[] b=new int[n];
   for(int i=0;i<n-1;i++){
       a[i]=s.nextInt();
   }for(int i=0;i<n-1;i++){
            b[i]=s.nextInt();
        }int preliye=0;int pre=0;sb.append(0+" ");
        for(int i=0;i<n-1;i++){
       if(preliye==1){
           pre=Math.min(pre+a[i],pre+b[i]);
           if(pre+a[i]<pre+b[i]){
               preliye=0;
           }sb.append(pre+" ");
       }else{
           pre=Math.min(pre+a[i],pre+b[i]+k);
           if(pre+a[i]>=pre+b[i]+k){
               preliye=1;
           }sb.append(pre+" ");
       }
        }
        System.out.println(sb.toString());
}}


//package com.company;
import java.io.*;
import java.util.*;
import java.math.*;

public class Main{
    public static void main(String[] args)throws Exception {
        Scanner s = new Scanner(System.in);StringBuilder sb=new StringBuilder();
   int n=s.nextInt(); int k=s.nextInt();
  int[] a=new int[n];int[] b=new int[n];
   for(int i=0;i<n-1;i++){
       a[i]=s.nextInt();
   }for(int i=0;i<n-1;i++){
            b[i]=s.nextInt();
        }int preliye=0;int pre=0;sb.append(0+" ");
        for(int i=0;i<n-1;i++){
       if(preliye==1){
           pre=Math.min(pre+a[i],pre+b[i]);
           if(pre+a[i]<pre+b[i]){
               preliye=0;
           }sb.append(pre+" ");
       }else{
           pre=Math.min(pre+a[i],pre+b[i]+k);
           if(pre+a[i]>pre+b[i]+k){
               preliye=1;
           }sb.append(pre+" ");
       }
        }
        System.out.println(sb.toString());
}}


import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
    InputStream is;
    PrintWriter out;
    String INPUT = "";
    //class  Declaration

    static class pair implements Comparable < pair > {
        long x;
        long y;

        pair(long i, long j) {
            x = i;
            y = j;

        }
        public int compareTo(pair p) {
            if (this.x != p.x) {
                return Long.compare(this.x,p.x);
            } else {
                return Long.compare(this.y,p.y);
            }
        }
        public int hashCode() {
            return (x + " " + y).hashCode();
        }
        public String toString() {
            return x + " " + y;
        }
        public boolean equals(Object o) {
            pair x = (pair) o;
            return (x.x == this.x && x.y == this.y);
        }
    }
    // int[] dx = {0,0,1,-1};
    // int[] dy = {1,-1,0,0};
    // int[] ddx = {0,0,1,-1,1,-1,1,-1};
    // int[] ddy = {1,-1,0,0,1,-1,-1,1};

int inf = (int) 1e9 + 9;
long biginf  = (long)1e17 + 7 ;
long mod =  (long)1e9 + 7;

void solve() throws Exception {
int n=ni(),c=ni();
int[] a= na(n-1);
int[] b= na(n-1);
int[][]dp=  new int[2][n];
dp[0][0] = 0;
dp[1][0] = c ;
p(0+" ");
for(int i=1;i<n;++i){
    dp[0][i] = Math.min(dp[0][i-1]+a[i-1],dp[1][i-1]+a[i-1]);
    dp[1][i] = Math.min(dp[1][i-1]+b[i-1],dp[0][i-1]+b[i-1]+c) ;
    p(Math.min(dp[0][i],dp[1][i])+" ");
}
pn("");

}
void reverse(char[] str){
    int n=str.length;
    for(int i=0;i<n/2;++i){
        char temp = str[i];
        str[i]= str[n-i-1];
        str[n-i-1] = temp;
    }
}

long pow(long a, long b) {
        long result = 1;
        while (b > 0) {
            if (b % 2 == 1) result = (result * a) % mod;
            b /= 2;
            a = (a * a) % mod;
        }
        return result;
    }

    void print(Object o) {
        System.out.println(o);
        System.out.flush();
    }

    long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    void run() throws Exception {
        is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        long s = System.currentTimeMillis();
        solve();
        out.flush();
        if (!INPUT.isEmpty()) tr(System.currentTimeMillis() - s + "ms");
    }

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    //output methods
    private void pn(Object o) {
        out.println(o);
    }
    private void p(Object o) {
        out.print(o);
    }
    private ArrayList < ArrayList < Integer >> ng(int n, int e) {
        ArrayList < ArrayList < Integer >> g = new ArrayList < > ();
        for (int i = 0; i <= n; ++i) g.add(new ArrayList < > ());

        for (int i = 0; i < e; ++i) {
            int u = ni(), v = ni();
            g.get(u).add(v);
            g.get(v).add(u);
        }

        return g;
    }

    private ArrayList < ArrayList < pair >> nwg(int n, int e) {
        ArrayList < ArrayList < pair >> g = new ArrayList < > ();
        for (int i = 0; i <= n; ++i) g.add(new ArrayList < > ());

        for (int i = 0; i < e; ++i) {
            int u = ni(), v = ni(), w = ni();
            g.get(u).add(new pair(w, v));
            g.get(v).add(new pair(w, u));
        }

        return g;
    }

    //input methods
    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }
    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b));
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }
    private char nc() {
        return (char) skip();
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++) map[i] = ns(m);
        return map;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ni();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private void tr(Object...o) {
        if (INPUT.length() > 0) System.out.println(Arrays.deepToString(o));
    }
    void watch(Object...a) throws Exception {
        int i = 1;
        print("watch starts :");
        for (Object o: a) {
            //print(o);
            boolean notfound = true;
            if (o.getClass().isArray()) {

                String type = o.getClass().getName().toString();
                //print("type is "+type);
                switch (type) {
                    case "[I":
                        {
                            int[] test = (int[]) o;
                            print(i + " " + Arrays.toString(test));
                            break;
                        }
                    case "[[I":
                        {
                            int[][] obj = (int[][]) o;

                            print(i + " " + Arrays.deepToString(obj));
                            break;
                        }
                    case "[J":
                        {

                            long[] obj = (long[]) o;
                            print(i + " " + Arrays.toString(obj));
                            break;
                        }
                    case "[[J":
                        {

                            long[][] obj = (long[][]) o;
                            print(i + " " + Arrays.deepToString(obj));
                            break;
                        }
                    case "[D":
                        {

                            double[] obj = (double[]) o;
                            print(i + " " + Arrays.toString(obj));
                            break;
                        }
                    case "[[D":
                        {

                            double[][] obj = (double[][]) o;
                            print(i + " " + Arrays.deepToString(obj));
                            break;
                        }
                    case "[Ljava.lang.String":
                        {

                            String[] obj = (String[]) o;
                            print(i + " " + Arrays.toString(obj));
                            break;
                        }
                    case "[[Ljava.lang.String":
                        {

                            String[][] obj = (String[][]) o;
                            print(i + " " + Arrays.deepToString(obj));
                            break;
                        }
                    case "[C":
                        {
                            char[] obj = (char[]) o;
                            print(i + " " + Arrays.toString(obj));
                            break;
                        }
                    case "[[C":
                        {

                            char[][] obj = (char[][]) o;
                            print(i + " " + Arrays.deepToString(obj));
                            break;
                        }

                    default:
                        {
                            print(i + " type not identified");
                            break;
                        }
                }
                notfound = false;

            }
            if (o.getClass() == ArrayList.class) {
                print(i + " al: " + o);
                notfound = false;
            }
            if (o.getClass() == HashSet.class) {
                print(i + " hs: " + o);
                notfound = false;
            }
            if (o.getClass() == TreeSet.class) {
                print(i + " ts: " + o);
                notfound = false;
            }
            if (o.getClass() == TreeMap.class) {
                print(i + " tm: " + o);
                notfound = false;
            }
            if (o.getClass() == HashMap.class) {
                print(i + " hm: " + o);
                notfound = false;
            }
            if (o.getClass() == LinkedList.class) {
                print(i + " ll: " + o);
                notfound = false;
            }
            if (o.getClass() == PriorityQueue.class) {
                print(i + " pq : " + o);
                notfound = false;
            }
            if (o.getClass() == pair.class) {
                print(i + " pq : " + o);
                notfound = false;
            }

            if (notfound) {
                print(i + " unknown: " + o);
            }
            i++;
        }
        print("watch ends ");
    }

}


import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Set;

public class Main {

	InputStream is;
	PrintWriter out;
	String INPUT = "";

	private static final long M = 1000000007L;

	void solve() {
		StringBuffer sb = new StringBuffer();
		int n = ni()-1;
		int C = ni();

		int[] a = na(n);
		int[] b = na(n);
		int dp[][] = new int[n + 1][2];
		dp[0][1] = Integer.MAX_VALUE / 2;

		for (int i = 1; i <= n; i++) {
			dp[i][0] = Math.min(dp[i - 1][0] + a[i-1], dp[i - 1][1] + a[i-1]);
			dp[i][1] = Math.min(dp[i - 1][1] + b[i-1], dp[i - 1][0] + b[i-1] + C);
		}
//		tr(dp[0], dp[1], dp[2]);
		for (int i = 0; i <= n; i++)
			sb.append(Math.min(dp[i][0], dp[i][1])).append(' ');
		System.out.println(sb);
	}

	void run() throws Exception {
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		if (!INPUT.isEmpty())
			tr(System.currentTimeMillis() - s + "ms");
	}

	public static void main(String[] args) throws Exception {
		new Main().run();
	}

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	private int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd() {
		return Double.parseDouble(ns());
	}

	private char nc() {
		return (char) skip();
	}

	private String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '
									// ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n) {
			if (!(isSpaceChar(b)))
				buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int[][] na(int n, int m) {
		int[][] a = new int[n][];
		for (int i = 0; i < n; i++)
			a[i] = na(m);
		return a;
	}

	private int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private static void tr(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
}


import java.util.*;
public class Abc {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int c = in.nextInt();
		int ar[] = new int[n - 1];
		int br[] = new int[n - 1];
		for(int i = 0; i < n - 1; i++) {
			ar[i] = in.nextInt();
		}
		for(int i = 0; i < n - 1; i++) {
			br[i] = in.nextInt();
		}

		boolean isElevatorUsed = false;
		int sum = 0;
		for(int i = 0; i < n - 1; i++) {
			System.out.print(sum + " ");
			int stair_cost = sum + ar[i];
			int elevator_cost = sum + br[i];
			if(!isElevatorUsed) {
				elevator_cost += c;
			}
			if(stair_cost < elevator_cost) {
				isElevatorUsed = false;
				sum = stair_cost;
			} else {
				isElevatorUsed = true;
				sum = elevator_cost;
			}
		}
		System.out.println(sum);
	}
}


import java.util.*;
public class Abc {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int c = in.nextInt();
		int ar[] = new int[n - 1];
		int br[] = new int[n - 1];
		for(int i = 0; i < n - 1; i++) {
			ar[i] = in.nextInt();
		}
		for(int i = 0; i < n - 1; i++) {
			br[i] = in.nextInt();
		}

		int dp[][] = new int[n][2];
		dp[0][0] = 0;
		dp[0][1] = c;
		for(int i = 1; i < n ;i++) {
			dp[i][0] = Integer.MAX_VALUE;
			dp[i][1] = Integer.MAX_VALUE;
		}
		for(int i = 0; i < n - 1; i++) {
			System.out.print(Math.min(dp[i][0],dp[i][1])+ " ");
			dp[i+1][0] = Math.min(dp[i+1][0], dp[i][0]+ar[i]);
			dp[i+1][0] = Math.min(dp[i+1][0], dp[i][1]+ar[i]);

			dp[i+1][1] = Math.min(dp[i+1][1], dp[i][0] + br[i] + c);
			dp[i+1][1] = Math.min(dp[i+1][1], dp[i][1] + br[i]);
		}
		System.out.println(Math.min(dp[n-1][0],dp[n-1][1]));
	}
}


import java.util.*;
public class Abc {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int c = in.nextInt();
		int ar[] = new int[n - 1];
		int br[] = new int[n - 1];
		for(int i = 0; i < n - 1; i++) {
			ar[i] = in.nextInt();
		}
		for(int i = 0; i < n - 1; i++) {
			br[i] = in.nextInt();
		}

		int dp[][] = new int[n][2];
		dp[0][0] = 0;
		dp[0][1] = c;
		for(int i = 1; i < n ;i++) {
			dp[i][0] = Integer.MAX_VALUE;
			dp[i][1] = Integer.MAX_VALUE;
		}
		for(int i = 0; i < n - 1; i++) {
			System.out.print(Math.min(dp[i][0],dp[i][1])+ " ");

			dp[i+1][0] = Math.min(dp[i][0]+ar[i], dp[i][1]+ar[i]);
			dp[i+1][1] = Math.min(dp[i][0] + br[i] + c, dp[i][1] + br[i]);
		}
		System.out.println(Math.min(dp[n-1][0],dp[n-1][1]));
	}
}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.net.Inet4Address;
import java.util.*;
import java.lang.*;
import java.util.HashMap;
import java.util.PriorityQueue;
public class Solution implements Runnable
{
    static class pair implements Comparable
    {
        int f;
        int s;
        pair(int fi, int se)
        {
            f=fi;
            s=se;
        }
        public int compareTo(Object o)//desc order
        {
            pair pr=(pair)o;
            if(s>pr.s)
                return -1;
            if(s==pr.s)
            {
                if(f>pr.f)
                    return 1;
                else
                    return -1;
            }
            else
                return 1;
        }
        public boolean equals(Object o)
        {
            pair ob=(pair)o;
            if(o!=null)
            {
                if((ob.f==this.f)&&(ob.s==this.s))
                    return true;
            }
            return false;
        }
        public int hashCode()
        {
            return (this.f+" "+this.s).hashCode();
        }
    }
    public class triplet implements Comparable
    {
        int f;
        int s;
        int t;
        triplet(int f,int s,int t)
        {
            this.f=f;
            this.s=s;
            this.t=t;
        }
        public boolean equals(Object o)
        {
            triplet ob=(triplet)o;
            int ff;
            int ss;
            double tt;
            if(o!=null)
            {
                ff=ob.f;
                ss=ob.s;
                tt=ob.t;
                if((ff==this.f)&&(ss==this.s)&&(tt==this.t))
                    return true;
            }
            return false;
        }
        public int hashCode()
        {
            return (this.f+" "+this.s+" "+this.t).hashCode();
        }
        public int compareTo(Object o)//ascending order
        {
            triplet tr=(triplet)o;
            if(t>tr.t)
                return 1;
            else
                return -1;
        }
    }
    void merge1(int arr[], int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int [n1];
        int R[] = new int [n2];
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];
        int i = 0, j = 0;
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i]<=R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }
    void sort1(int arr[], int l, int r)
    {
        if (l < r)
        {
            int m = (l+r)/2;
            sort1(arr, l, m);
            sort1(arr , m+1, r);
            merge1(arr, l, m, r);
        }
    }
    int n,c,a[],b[];
    int dp[][];
    int solve(int i , int k)
    {
        if(i==1)
            return 0;
        if(dp[i][k]!= Integer.MAX_VALUE)
            return dp[i][k];
        if(k==0 || k==1)
            dp[i][k]=Math.min(a[i-1]+solve(i-1,1),c+b[i-1]+solve(i-1,2));
        else
            dp[i][k]=Math.min(a[i-1]+solve(i-1,1),b[i-1]+solve(i-1,2));
        return dp[i][k];
    }
    public static void main(String args[])throws Exception
    {
        new Thread(null,new Solution(),"Solution",1<<27).start();
    }
    public void run()
    {
        try
        {
            InputReader in = new InputReader(System.in);
            PrintWriter out = new PrintWriter(System.out);
            n=in.ni();
            c=in.ni();
            a=new int[n+1];
            b=new int[n+1];
            for(int i=1;i<n;i++)
                a[i]=in.ni();
            for(int i=1;i<n;i++)
                b[i]=in.ni();
            dp=new int[n+1][3];
            for(int i=0;i<=n;i++)
                Arrays.fill(dp[i], Integer.MAX_VALUE);
            for(int i=1;i<=n;i++)
                out.print(solve(i,0)+" ");
            out.close();
        }
        catch(Exception e){
            System.out.println(e);
        }
    }
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
}


//When I wrote this code, only God & I understood what it did. Now only God knows !!

import java.util.*;
import java.io.*;
import java.math.*;
public class Main {

    static class FastReader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public FastReader() { this(System.in); }public FastReader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String next(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(next()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public void scanIntArr(int [] arr){ for(int li=0;li<arr.length;++li){ arr[li]=i();}}
        public void scanLongArr(long [] arr){for (int i=0;i<arr.length;++i){arr[i]=l();}}
        public void shuffle(int [] arr){ for(int i=arr.length;i>0;--i) { int r=(int)(Math.random()*i); int temp=arr[i-1]; arr[i-1]=arr[r]; arr[r]=temp; } }
    }

    public static int mod = (int) (1e9 + 7);

    public static void main(String[] args) throws IOException {
        // new Thread(null,new Main(),"Anything",1<<27).start();

        FastReader fr = new FastReader();
        PrintWriter pw = new PrintWriter(System.out);
        /*
inputCopy
10 2
7 6 18 6 16 18 1 17 17
6 9 3 10 9 1 10 1 5
outputCopy
0 7 13 18 24 35 36 37 40 45
inputCopy
10 1
3 2 3 1 3 3 1 4 1
1 2 3 4 4 1 2 1 3
outputCopy
0 2 4 7 8 11 13 14 16 17
        */

        int n = fr.i();
        int c=fr.i();

        int [] stairs=new int[n-1];
        int [] elevators=new int[n-1];

        fr.scanIntArr(stairs);
        fr.scanIntArr(elevators);

        int [][] dp=new int[n][2];
        dp[0][0]=0;
        dp[0][1]=c;

        System.err.println("Here");
        for(int i=1;i<n;++i)
        {
            dp[i][0]=Math.min(dp[i-1][0]+stairs[i-1],dp[i-1][1]+stairs[i-1]);
            dp[i][1]=Math.min(dp[i-1][0]+elevators[i-1]+c,dp[i-1][1]+elevators[i-1]);
        }
        System.err.println("Here2");
        for(int i=0;i<n;++i)
            pw.print(Math.min(dp[i][0],dp[i][1])+" ");
        pw.flush();
        pw.close();
    }
}


import java.io.*;
import java.util.*;
public class Main {
    public static void main(String args[])
    {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=1;
        while(T-->0)
        {
            int n=input.nextInt();
            int c=input.nextInt();
            int a[]=new int[n-1];
            for(int i=0;i<n-1;i++)
            {
                a[i]=input.nextInt();
            }
            int b[]=new int[n-1];
            for(int i=0;i<n-1;i++)
            {
                b[i]=input.nextInt();
            }
            int pre=0;
            ArrayList<Integer> list=new ArrayList<>();
            list.add(0);
            int dp[][]=new int[n][2];
            dp[0][0]=0;
            dp[0][1]=c;
            for(int i=1;i<n;i++)
            {
                int x=a[i-1];
                int y=b[i-1];
                dp[i][0]=Math.min(dp[i-1][0]+x,dp[i-1][1]+x);
                dp[i][1]=Math.min(dp[i-1][0]+y+c,dp[i-1][1]+y);
                list.add(Math.min(dp[i][0],dp[i][1]));
            }
            for(int i=0;i<list.size();i++)
            {
                out.print(list.get(i)+" ");
            }
            out.println();
        }
        out.close();
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.io.*;
import java.util.*;
public class Main {
    public static void main(String args[])
    {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=1;
        while(T-->0)
        {
            int n=input.nextInt();
            int c=input.nextInt();
            int a[]=new int[n-1];
            for(int i=0;i<n-1;i++)
            {
                a[i]=input.nextInt();
            }
            int b[]=new int[n-1];
            for(int i=0;i<n-1;i++)
            {
                b[i]=input.nextInt();
            }
            int pre=0;
            ArrayList<Integer> list=new ArrayList<>();
            list.add(0);
            for(int i=0;i<n-1;i++)
            {
                int x=a[i];
                int y=b[i];
                if(pre==0)
                {
                    y+=c;
                }
                if(y<=x)
                {
                    list.add(list.get(list.size()-1)+y);
                    pre=1;
                }
                else
                {
                    list.add(list.get(list.size()-1)+x);
                    pre=0;
                }
            }
            for(int i=0;i<list.size();i++)
            {
                out.print(list.get(i)+" ");
            }
            out.println();
        }
        out.close();
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.io.*;
import java.util.*;
public class Main {
    public static void main(String args[])
    {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=1;
        while(T-->0)
        {
            int n=input.nextInt();
            int c=input.nextInt();
            int a[]=new int[n-1];
            for(int i=0;i<n-1;i++)
            {
                a[i]=input.nextInt();
            }
            int b[]=new int[n-1];
            for(int i=0;i<n-1;i++)
            {
                b[i]=input.nextInt();
            }
            int pre=0;
            ArrayList<Integer> list=new ArrayList<>();
            list.add(0);
            for(int i=0;i<n-1;i++)
            {
                int x=a[i];
                int y=b[i];
                if(pre==0)
                {
                    y+=c;
                }
                if(y<=x)
                {
                    list.add(list.get(list.size()-1)+y);
                    pre=1;
                }
                else
                {
                    list.add(list.get(list.size()-1)+x);
                    pre=0;
                }
            }
            out.println(list);
        }
        out.close();
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.MARSHAL;
import sun.nio.cs.ext.MacThai;

import javax.swing.plaf.basic.BasicTreeUI;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

public class Main {
    private static Scanner sc;
    private static Printer pr;
    static boolean []visited;
    static int []color;
    static int []pow=new int[(int)3e5+1];
    static int []count;
    static boolean check=true;
    static boolean checkBip=true;
    static TreeSet<Integer>[]list;
    private static long aLong=(long)(Math.pow(10,9)+7);
    static final long div=998244353;
    static  int answer=0;
    static int[]countSubTree;
    static int[]colorNode;
    static boolean con=true;
    static ArrayList<Integer>dfsPath=new ArrayList<>();
    static ArrayList<Integer>ans=new ArrayList<>();
    static boolean[]rec;
    static int min=Integer.MAX_VALUE;
    static ArrayList<Task>tasks=new ArrayList<>();
    static  boolean []checkpath;
    static long []out;
    static TreeSet<Integer>[]dp;
    static long[]valVertex;
    static int anss=0;
    static long []poww=new long[40];
    private static void solve() throws IOException {
        int n=sc.nextInt(),cost=sc.nextInt();
        int [][]dp=new int[n][2];
        int []a=new int[n];
        int []b=new int[n];
        for (int i=1;i<n;++i)a[i]=sc.nextInt();
        for (int i=1;i<n;++i)b[i]=sc.nextInt();
        dp[0][0]=0;
        dp[0][1]=cost;
        for (int i=0;i<n-1;++i){
            dp[i+1][0]=Math.min(dp[i][0],dp[i][1])+a[i+1];
            dp[i+1][1]=Math.min(dp[i][0]+cost,dp[i][1])+b[i+1];
        }
        //pr.println(Arrays.deepToString(dp));
        for (int i=0;i<n;++i)pr.print(Math.min(dp[i][0],dp[i][1])+" ");
    }
    public static class dsu{
        int []rank;
        int[]parent;
        long []sum;
        int n;
        public dsu(int n) {
            this.n = n;
            parent=new int[n];
            rank=new int[n];
            sum=new long[n];
            for (int i=0;i<n;++i){
                rank[i]=1;
                parent[i]=i;
                sum[i]=0;
            }
        }
        public int dad(int child){
            if (parent[child]==child)return child;
            else return dad(parent[child]);
        }
        public void merge(int u,int v){
            int dadU=dad(u);
            int dadV=dad(v);
            if (dadU==dadV)return ;
            if (u!=v){
                if (rank[u]<rank[v]){
                    parent[u]=v;
                    rank[v]+=rank[u];
                }
                else if (rank[u]==rank[v]){
                    parent[u]=v;
                    rank[v]+=rank[u];
                }
                else{
                    parent[v]=u;
                    rank[u]+=rank[v];
                }
            }
        }
    }
    public static long power(long x,long y,long mods){
        if (y==0) return 1%mods;
        long u=power(x,y/2,mods);
        u=((u)*(u))%mods;
        if (y%2==1) u=(u*(x%mods))%mods;
        return u;
    }
    public static class Task implements Comparable<Task>{
        long l,r;
        public Task(long w,long v) {
            this.l=w;
            this.r=v;
        }

        @Override
        public int compareTo(Task o) {
            if (o.l<this.l)return 1;
            else if (o.l>this.l)return -1;
            else {
                if (o.r>this.r)return 1;
                else if (o.r<this.r)return -1;
            }
            return 0;
        }
    }
    public static void printSolve(StringBuilder str, int[] colors, int n,int color){
        for(int i = 1;i<=n;++i)
            if(colors[i] == color)
                str.append(i + " ");
        str.append('\n');
    }
    public static class pairTask{
        int  val;
        int size;
        public pairTask(int   x, int  y) {
            this.val = x;
            this.size = y;
        }
    }
    public static void subTree(int src,int parent,int x){
        countSubTree[src]=1;
        if (src==x) {
            checkpath[src]=true;
            //System.out.println("src:"+src);
        }
        else checkpath[src]=false;
        for (int v:list[src]){
            if (v==parent)
                continue;
            subTree(v,src,x);
            countSubTree[src]+=countSubTree[v];
            checkpath[src]|=checkpath[v];
        }
    }
    public static boolean prime(long src){
        for (int i=2;i*i<=src;i++){
            if (src%i==0)
                return false;
        }
        return true;
    }
    public static void bfsColor(int src){
        Queue<Integer>queue = new ArrayDeque<>();
        queue.add(src);
        while (!queue.isEmpty()){
            boolean b=false;
            int vertex=-1,p=-1;
            int poll=queue.remove();
            for (int v:list[poll]){
                if (color [v]==0){
                    vertex=v;
                    break;
                }
            }
            for (int v:list[poll]){
                if (color [v]!=0&&v!=vertex){
                    p=v;
                    break;
                }
            }
            for (int v:list[p]){
                if (color [v]!=0){
                    color[vertex]=color[v];
                    b=true;
                    break;
                }
            }
            if (!b){
                color[vertex]=color[poll]+1;
            }
        }
    }
    static int add(int a,int b ){
        if (a+b>=div)
            return (int)(a+b-div);
        return (int)a+b;
    }
    public static int isBipartite(ArrayList<Integer>[]list,int src){
        color[src]=0;
        Queue<Integer>queue=new LinkedList<>();
        int []ans={0,0};
        queue.add(src);
        while (!queue.isEmpty()){
            ans[color[src=queue.poll()]]++;
            for (int v:list[src]){
                if (color[v]==-1){
                    queue.add(v);
                    color[v]=color[src]^1;
                }else if (color[v]==color[src])
                    check=false;
            }
        }
        return add(pow[ans[0]],pow[ans[1]]);
    }
    public static int powerMod(long b, long e){
        long ans=1;
        while (e-->0){
            ans=ans*b%div;
        }
        return (int)ans;
    }
    public static int dfs(int s){
        int ans=1;
        visited[s]=true;
        for (int k:list[s]){
            if (!visited[k]){
                ans+=dfs(k);
            }
        }
        return ans;
    }
    public static int[] radixSort(int[] f) {
        int[] to = new int[f.length];
        {
            int[] b = new int[65537];
            for (int i = 0; i < f.length; i++) b[1 + (f[i] & 0xffff)]++;
            for (int i = 1; i <= 65536; i++) b[i] += b[i - 1];
            for (int i = 0; i < f.length; i++) to[b[f[i] & 0xffff]++] = f[i];
            int[] d = f;
            f = to;
            to = d;
        }
        {
            int[] b = new int[65537];
            for (int i = 0; i < f.length; i++) b[1 + (f[i] >>> 16)]++;
            for (int i = 1; i <= 65536; i++) b[i] += b[i - 1];
            for (int i = 0; i < f.length; i++) to[b[f[i] >>> 16]++] = f[i];
            int[] d = f;
            f = to;
            to = d;
        }
        return f;
    }
    public static long []primeFactor(int n){
        long []prime=new long[n+1];
        prime[1]=1;
        for (int i=2;i<=n;i++)
            prime[i]=((i&1)==0)?2:i;
        for (int i=3;i*i<=n;i++){
            if (prime[i]==i){
                for (int j=i*i;j<=n;j+=i){
                    if (prime[j]==j)
                        prime[j]=i;
                }
            }
        }
        return prime;
    }
    public static StringBuilder binaryradix(long number){
        StringBuilder builder=new StringBuilder();
        long remainder;
        while (number!=0) {
            remainder = number % 2;
            number >>= 1;
            builder.append(remainder);
        }
        builder.reverse();
        return builder;
    }
    public static int binarySearch(long[] a, int index,long target) {
            int l = index;
            int h = a.length - 1;
            while (l<=h) {
                int med = l + (h-l)/2;
                if(a[med] - target <= target) {
                    l = med + 1;
                }
                else h = med  - 1;
            }
            return h;
    }
    public static int val(char c){
        return c-'0';
    }
    public static long gcd(long a,long b) {
        if (a == 0) return b;
        return gcd(b % a, a);
    }
        private static class Pair implements Comparable<Pair> {
            long x;
            long y;

            Pair() {
                this.x = 0;
                this.y = 0;
            }

            Pair(long x, long y) {
                this.x = x;
                this.y = y;
            }

            @Override
            public boolean equals(Object obj) {
                if (this == obj) {
                    return true;
                }
                if (obj == null) return false;
                Pair other = (Pair) obj;
                if (this.x == other.x && this.y == other.y) {
                    return true;
                }
                return false;
            }

            @Override
            public int compareTo(Pair other) {
                if (this.x != other.x) return Long.compare(this.x, other.x);
                return Long.compare(this.y*other.x, this.x*other.y);
            }
    }

    public static void main(String[] args) throws IOException {
        sc = new Scanner(System.in);
        pr = new Printer(System.out);
        solve();

        pr.close();
       // sc.close();
    }
    private static class Scanner {
        BufferedReader br;

        Scanner (InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }

        private boolean isPrintable(int ch) {
            return ch >= '!' && ch <= '~';
        }

        private boolean isCRLF(int ch) {
            return ch == '\n' || ch == '\r' || ch == -1;
        }

        private int nextPrintable() {
            try {
                int ch;
                while (!isPrintable(ch = br.read())) {
                    if (ch == -1) {
                        throw new NoSuchElementException();
                    }
                }

                return ch;
            } catch (IOException e) {
                throw new NoSuchElementException();
            }
        }

        String next() {
            try {
                int ch = nextPrintable();
                StringBuilder sb = new StringBuilder();
                do {
                    sb.appendCodePoint(ch);
                } while (isPrintable(ch = br.read()));

                return sb.toString();
            } catch (IOException e) {
                throw new NoSuchElementException();
            }
        }

        int nextInt() {
            try {
                // parseInt from Integer.parseInt()
                boolean negative = false;
                int res = 0;
                int limit = -Integer.MAX_VALUE;
                int radix = 10;

                int fc = nextPrintable();
                if (fc < '0') {
                    if (fc == '-') {
                        negative = true;
                        limit = Integer.MIN_VALUE;
                    } else if (fc != '+') {
                        throw new NumberFormatException();
                    }
                    fc = br.read();
                }
                int multmin = limit / radix;

                int ch = fc;
                do {
                    int digit = ch - '0';
                    if (digit < 0 || digit >= radix) {
                        throw new NumberFormatException();
                    }
                    if (res < multmin) {
                        throw new NumberFormatException();
                    }
                    res *= radix;
                    if (res < limit + digit) {
                        throw new NumberFormatException();
                    }
                    res -= digit;

                } while (isPrintable(ch = br.read()));

                return negative ? res : -res;
            } catch (IOException e) {
                throw new NoSuchElementException();
            }
        }

        long nextLong() {
            try {
                // parseLong from Long.parseLong()
                boolean negative = false;
                long res = 0;
                long limit = -Long.MAX_VALUE;
                int radix = 10;

                int fc = nextPrintable();
                if (fc < '0') {
                    if (fc == '-') {
                        negative = true;
                        limit = Long.MIN_VALUE;
                    } else if (fc != '+') {
                        throw new NumberFormatException();
                    }
                    fc = br.read();
                }
                long multmin = limit / radix;

                int ch = fc;
                do {
                    int digit = ch - '0';
                    if (digit < 0 || digit >= radix) {
                        throw new NumberFormatException();
                    }
                    if (res < multmin) {
                        throw new NumberFormatException();
                    }
                    res *= radix;
                    if (res < limit + digit) {
                        throw new NumberFormatException();
                    }
                    res -= digit;

                } while (isPrintable(ch = br.read()));

                return negative ? res : -res;
            } catch (IOException e) {
                throw new NoSuchElementException();
            }
        }

        float nextFloat() {
            return Float.parseFloat(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            try {
                int ch;
                while (isCRLF(ch = br.read())) {
                    if (ch == -1) {
                        throw new NoSuchElementException();
                    }
                }
                StringBuilder sb = new StringBuilder();
                do {
                    sb.appendCodePoint(ch);
                } while (!isCRLF(ch = br.read()));

                return sb.toString();
            } catch (IOException e) {
                throw new NoSuchElementException();
            }
        }

        void close() {
            try {
                br.close();
            } catch (IOException e) {
//				throw new NoSuchElementException();
            }
        }
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

    static class List {
        String Word;
        int length;

        List(String Word, int length) {
            this.Word = Word;
            this.length = length;
        }
    }
    private static class Printer extends PrintWriter {
        Printer(PrintStream out) {
            super(out);
        }
    }
}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define f(i,x,n) for(ll int i=x;i<n;i++)
#define re(j,x,n) for(ll int j=x;j>=n;j--)
#define f1(k,x,n) for(ll int k=x;k<=n;k++)
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define MAX 1000001
using namespace std;

void solve(){
    ll n,p;
    cin>>n>>p;
    ll a[n],b[n],c=0;
    for(int i=0;i<n-1;i++){
        cin>>a[i];
    }
    for(int i=0;i<n-1;i++){
        cin>>b[i];
    }
    //for(int i=0;i<n;i++) cout<<b[i];
    int f=0;
    for(int i=0;i<n;i++){
        cout<<c<<" ";
        if(a[i]<=b[i]+p){
            c+=a[i];
            f=0;
        }
        else{
            c+=b[i]+p*(1-f);
            f=1;
        }
    }
    cout<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll int q;
    solve();
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define f(i,x,n) for(ll int i=x;i<n;i++)
#define re(j,x,n) for(ll int j=x;j>=n;j--)
#define f1(k,x,n) for(ll int k=x;k<=n;k++)
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define MAX 1000001
using namespace std;

void solve(){
    ll n,p;
    cin>>n>>p;
    ll a[n],b[n],c=0;
    for(int i=0;i<n-1;i++){
        cin>>a[i];
    }
    for(int i=0;i<n-1;i++){
        cin>>b[i];
    }
    //for(int i=0;i<n;i++) cout<<b[i];
    int f=0;
    for(int i=0;i<n;i++){
        cout<<c<<" ";
        if(a[i]<=b[i]+p && f==0){
            c+=a[i];
            f=0;
        }
        else if(a[i]>b[i] && f==0){
            c+=b[i]+p;
            f=1;
        }
        else if(a[i]>=b[i] && f==1){
            c+=b[i];
            f=1;
        }
        else if(a[i]<b[i] && f==1){
            c+=a[i];
            f=0;
        }

    }
    cout<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll int q;
    solve();
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define f(i,x,n) for(ll int i=x;i<n;i++)
#define re(j,x,n) for(ll int j=x;j>=n;j--)
#define f1(k,x,n) for(ll int k=x;k<=n;k++)
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define MAX 1000001
using namespace std;

void solve(){
    ll n,p;
    cin>>n>>p;
    ll a[n],b[n],c=0;
    for(int i=0;i<n-1;i++){
        cin>>a[i];
    }
    for(int i=0;i<n-1;i++){
        cin>>b[i];
    }
    //for(int i=0;i<n;i++) cout<<b[i];
    int f=0;
    for(int i=0;i<n;i++){
        cout<<c<<" ";
        if(a[i]<=b[i]+p && f==0){
            c+=a[i];
            f=0;
        }
        else if(a[i]>=b[i] && f==1){
            c+=b[i];
            f=1;
        }
        else if(a[i]<b[i] && f==1){
            c+=a[i];
            f=0;
        }
        else{
            c+=b[i]+p;
            f=1;
        }
    }
    cout<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll int q;
    solve();
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define f(i,x,n) for(ll int i=x;i<n;i++)
#define re(j,x,n) for(ll int j=x;j>=n;j--)
#define f1(k,x,n) for(ll int k=x;k<=n;k++)
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define MAX 1000001
using namespace std;

void solve(){
    ll n,p;
    cin>>n>>p;
    ll a[n],b[n],c[n],d[n];
    for(int i=0;i<n-1;i++)    cin>>a[i];
    for(int i=0;i<n-1;i++)
        cin>>b[i];
    c[0]=0,d[0]=p;
    for(int i=1;i<n;i++){
        c[i]=min(c[i-1],d[i-1])+a[i-1];
        d[i]=min(c[i-1]+p,d[i-1])+b[i-1];
    }
    for(int i=0;i<n;i++) cout<<min(c[i],d[i])<<" ";
    cout<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll int q;
    solve();
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define f(i,x,n) for(ll int i=x;i<n;i++)
#define re(j,x,n) for(ll int j=x;j>=n;j--)
#define f1(k,x,n) for(ll int k=x;k<=n;k++)
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define MAX 1000001
using namespace std;

void solve(){
    ll n,p;
    cin>>n>>p;
    ll a[n],b[n],c=0;
    for(int i=0;i<n-1;i++){
        cin>>a[i];
    }
    for(int i=0;i<n-1;i++){
        cin>>b[i];
    }
    //for(int i=0;i<n;i++) cout<<b[i];
    int f=0;
    for(int i=0;i<n;i++){
        cout<<c<<" ";
        if(a[i]<=b[i]+p && f==0){
            c+=a[i];
            f=0;
        }
        else if(a[i]<b[i] && f==1){
            c+=a[i];
            f=0;
        }
        else if(a[i]>b[i] && f==0){
            c+=b[i]+p;
            f=1;
        }
        else if(a[i]>=b[i] && f==1){
            c+=b[i];
            f=1;
        }
    }
    cout<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll int q;
    solve();
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define f(i,x,n) for(ll int i=x;i<n;i++)
#define re(j,x,n) for(ll int j=x;j>=n;j--)
#define f1(k,x,n) for(ll int k=x;k<=n;k++)
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define MAX 1000001
using namespace std;

void solve(){
    ll n,p;
    cin>>n>>p;
    ll a[n],b[n],c=0;
    for(int i=0;i<n-1;i++){
        cin>>a[i];
    }
    for(int i=0;i<n-1;i++){
        cin>>b[i];
    }
    //for(int i=0;i<n;i++) cout<<b[i];
    int f=0;
    for(int i=0;i<n;i++){
        cout<<c<<" ";
        if(a[i]<b[i]+p){
            c+=a[i];
            f=0;
        }
        else{
            c+=b[i]+p*(1-f);
            f=1;
        }
    }
    cout<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll int q;
    solve();
    return 0;
}


#include<iostream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include <cstdio>
#include<map>
#include<string>
#include<assert.h>
#include<unordered_map>
#include <cstring>//memset();
#define Amr_Abdelazim ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
#define pp pop_back
#define ll long long
#define ld long double
#define pll pair<ll,ll>
#define vll vector<ll>
#define vvll vector<vector<ll> >
#define vpll vector<pair<ll,ll> >
#define all(v) v.begin(),v.end()
#define rep(i,n)   for(int i=0;i<n;i++)
#define repp(s,i,n)   for(int i=s;i<n;i++)
#define print(v) for(auto i:v)cout<<i<<" ";cout<<"\n";
#define mkp make_pair
#define clr(ar,v) memset(ar,v,sizeof(ar));
#define TC ll t;cin>>t;while(t--)
#define in_vec ll n;cin>>n;vll v(n);rep(i,n)cin >> v[i];
#define EPS 1e-9
using namespace std;
const int mod = 1000000007;
const int N = 1000005;
class cmp{
public:
	bool operator() (pair<ll, pll> &A, pair<ll, pll> &B){
		return A > B;
	}
};
bool by_sec(pll &A, pll &B){
	return A.second < B.second;
}
bool is(pll a, pll b){
	return !((a.first > b.second&&a.second > b.second) || (a.first < b.first&&a.second < b.first));
}
ld dist(pll p1, pll p2){
	return (ld)sqrt((ld)(p1.first - p2.first)*(p1.first - p2.first) + (ld)(p1.second - p2.second)*(p1.second - p2.second));
}
ll dp[1000000 + 9];
int main()
{
	Amr_Abdelazim
		ll n, c;
	cin >> n >> c;
	bool rv = 1;
	vll v(n), b(n),sm(n);
	repp(1,i, n)cin >> v[i];
	repp(1, i, n)cin >> b[i],sm[i]=b[i]+sm[i-1];
	repp(1,i, n){

		dp[i] = min(c + sm[i], min((rv?c:0) + b[i] + dp[i - 1], v[i] + dp[i - 1]));
		if (c + sm[i]<min((rv ? c : 0) + b[i] + dp[i - 1], v[i] + dp[i - 1])||c + b[i] + dp[i - 1] < v[i] + dp[i - 1])rv = 0;
		else rv = 1;
	}
	repp(0, i, n)cout << dp[i] << " ";
	return 0;
}


#include<iostream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include <cstdio>
#include<map>
#include<string>
#include<assert.h>
#include<unordered_map>
#include <cstring>//memset();
#define Amr_Abdelazim ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
#define pp pop_back
#define ll long long
#define ld long double
#define pll pair<ll,ll>
#define vll vector<ll>
#define vvll vector<vector<ll> >
#define vpll vector<pair<ll,ll> >
#define all(v) v.begin(),v.end()
#define rep(i,n)   for(int i=0;i<n;i++)
#define repp(s,i,n)   for(int i=s;i<n;i++)
#define print(v) for(auto i:v)cout<<i<<" ";cout<<"\n";
#define mkp make_pair
#define clr(ar,v) memset(ar,v,sizeof(ar));
#define TC ll t;cin>>t;while(t--)
#define in_vec ll n;cin>>n;vll v(n);rep(i,n)cin >> v[i];
#define EPS 1e-9
using namespace std;
const int mod = 1000000007;
const int N = 1000005;
class cmp{
public:
	bool operator() (pair<ll, pll> &A, pair<ll, pll> &B){
		return A > B;
	}
};
bool by_sec(pll &A, pll &B){
	return A.second < B.second;
}
bool is(pll a, pll b){
	return !((a.first > b.second&&a.second > b.second) || (a.first < b.first&&a.second < b.first));
}
ld dist(pll p1, pll p2){
	return (ld)sqrt((ld)(p1.first - p2.first)*(p1.first - p2.first) + (ld)(p1.second - p2.second)*(p1.second - p2.second));
}
ll dp[1000000 + 9];
int main()
{
	Amr_Abdelazim
		ll n, c;
	cin >> n >> c;
	bool rv = 1;
	vll v(n), b(n),sm(n);
	repp(1,i, n)cin >> v[i];
	repp(1, i, n)cin >> b[i],sm[i]=b[i]+sm[i-1];
	repp(1,i, n){
		dp[i] = min(c + sm[i], min((rv?c:0) + b[i] + dp[i - 1], v[i] + dp[i - 1]));
		if (c + sm[i]<min((rv ? c : 0) + b[i] + dp[i - 1], v[i] + dp[i - 1]) || (rv ? c : 0) + b[i] + dp[i - 1] < v[i] + dp[i - 1])rv = 0;
		else rv = 1;
	}
	repp(0, i, n)cout << dp[i] << " ";
	return 0;
}


#include<iostream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include <cstdio>
#include<map>
#include<string>
#include<assert.h>
#include<unordered_map>
#include <cstring>//memset();
#define Amr_Abdelazim ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
#define pp pop_back
#define ll long long
#define ld long double
#define pll pair<ll,ll>
#define vll vector<ll>
#define vvll vector<vector<ll> >
#define vpll vector<pair<ll,ll> >
#define all(v) v.begin(),v.end()
#define rep(i,n)   for(int i=0;i<n;i++)
#define repp(s,i,n)   for(int i=s;i<n;i++)
#define print(v) for(auto i:v)cout<<i<<" ";cout<<"\n";
#define mkp make_pair
#define clr(ar,v) memset(ar,v,sizeof(ar));
#define TC ll t;cin>>t;while(t--)
#define in_vec ll n;cin>>n;vll v(n);rep(i,n)cin >> v[i];
#define EPS 1e-9
using namespace std;
const int mod = 1000000007;
const int N = 1000005;
class cmp{
public:
	bool operator() (pair<ll, pll> &A, pair<ll, pll> &B){
		return A > B;
	}
};
bool by_sec(pll &A, pll &B){
	return A.second < B.second;
}
bool is(pll a, pll b){
	return !((a.first > b.second&&a.second > b.second) || (a.first < b.first&&a.second < b.first));
}
ld dist(pll p1, pll p2){
	return (ld)sqrt((ld)(p1.first - p2.first)*(p1.first - p2.first) + (ld)(p1.second - p2.second)*(p1.second - p2.second));
}
ll dp[1000000 + 9];
int main()
{
	Amr_Abdelazim
		ll n, c;
	cin >> n >> c;
	bool rv = 1;
	vll v(n), b(n),sm(n);
	repp(1,i, n)cin >> v[i];
	repp(1, i, n)cin >> b[i],sm[i]=b[i]+sm[i-1];
	repp(1,i, n){
		dp[i] =  min((rv?c:0) + b[i] + dp[i - 1], v[i] + dp[i - 1]);
		if (c + b[i] + dp[i - 1] < v[i] + dp[i - 1])rv = 0;
		else rv = 1;
	}
	repp(0, i, n)cout << dp[i] << " ";
	return 0;
}