using System;
using System.Collections.Generic;
using System.Linq;

namespace Test01
{
    class PriorityQueue
    {
        int H;
        ABC[] heap;
        const int MAX = 2000000;

        public PriorityQueue()
        {
            H = 0;
            heap = new ABC[MAX];
        }

        public PriorityQueue(int size)
        {
            H = size;
            heap = new ABC[H + 1];
        }

        //上のuから下までずーと(入れ替えられなくなるor限界Hまで)
        public void MaxHeapfy(int p)
        {
            while (2 * p <= H)
            {
                int son_n = 2 * p;  //index
                ABC son = heap[2 * p];  //比較対象のオブジェクト
                if (2 * p + 1 <= H && son.sum < heap[2 * p + 1].sum)
                {
                    son = heap[2 * p + 1];
                    son_n++;
                }

                if (son.sum > heap[p].sum)
                {
                    ABC tmp = heap[p];
                    heap[p] = son;
                    heap[son_n] = tmp;
                }
                else
                {
                    break;
                }

                p = son_n;
            }
        }

        public void BuildMaxHeap()
        {
            for (int s = H / 2; s >= 1; s--)
            {
                MaxHeapfy(s);
            }
        }

        public void Insert(ABC key)
        {
            //下から上にずーとヒープ
            H++;
            heap[H] = key;

            int son = H;
            while (son != 1)
            {
                int p = son / 2;
                if (heap[son].sum > heap[p].sum)
                {
                    ABC tmp = heap[p];
                    heap[p] = heap[son];
                    heap[son] = tmp;
                    son /= 2;
                }
                else
                {
                    break;
                }
            }
        }

        public ABC ExtractMax()
        {
            ABC max = heap[1];
            heap[1] = heap[H];
            H--;

            MaxHeapfy(1);

            return max;
        }

        public ABC Peek()
        {
            return heap[1];
        }
    }

    struct ABC
    {
        public int a;
        public int b;
        public int c;
        public long sum;
        public ABC(int a, int b, int c, long s)
        {
            this.a = a;
            this.b = b;
            this.c = c;
            sum = s;
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            //入力1(X, Y, Z, K)
            int[] input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            int X = input[0];
            int Y = input[1];
            int Z = input[2];
            int K = input[3];
            //入力2(A, B, C)
            long[] A = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).OrderByDescending(x => x).ToArray();
            long[] B = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).OrderByDescending(x => x).ToArray();
            long[] C = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).OrderByDescending(x => x).ToArray();
            
            Dictionary<ABC, int> dic = new Dictionary<ABC, int>();
            List<long> ans = new List<long>();
            PriorityQueue pq = new PriorityQueue();
            ABC abc;

            int a = 0;
            int b = 0;
            int c = 0;
            abc = new ABC(a, b, c, A[a] + B[b] + C[c]);
            dic[abc] = 1;
            pq.Insert(abc);

            for (int i = 0; i < K; i++)
            {               
                abc = pq.ExtractMax();
                ans.Add(abc.sum);
                a = abc.a; b = abc.b; c = abc.c;
                
                if (a + 1 < X) abc = new ABC(a + 1, b, c, A[a + 1] + B[b] + C[c]);
                if (!dic.ContainsKey(abc)) { dic[abc] = 1; pq.Insert(abc); }
                if (b + 1 < Y) abc = new ABC(a, b + 1, c, A[a] + B[b + 1] + C[c]);
                if (!dic.ContainsKey(abc)) { dic[abc] = 1; pq.Insert(abc); }
                if (c + 1 < Z) abc = new ABC(a, b, c + 1, A[a] + B[b] + C[c + 1]);
                if (!dic.ContainsKey(abc)) { dic[abc] = 1; pq.Insert(abc); }
            }

            Console.WriteLine(string.Join("\n", ans));
        }
    }
}


Measured memory_bytes: 18900