using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            new ABC123().SolveD(new ConsoleInput(Console.In, ' '));
        }
    }

    public class ConsoleInput
    {
        private readonly System.IO.TextReader _stream;
        private char _separator = ' ';
        private Queue<string> inputStream;
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
            inputStream = new Queue<string>();
        }
        public string Read
        {
            get
            {
                if (inputStream.Count != 0) return inputStream.Dequeue();
                string[] tmp = _stream.ReadLine().Split(_separator);
                for (int i = 0; i < tmp.Length; ++i)
                    inputStream.Enqueue(tmp[i]);
                return inputStream.Dequeue();
            }
        }
        public string ReadLine { get { return _stream.ReadLine(); } }
        public int ReadInt { get { return int.Parse(Read); } }
        public long ReadLong { get { return long.Parse(Read); } }
        public double ReadDouble { get { return double.Parse(Read); } }
        public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
        public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
        public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
    }

    public class PriorityQueue<T> where T : IComparable
    {
        private IComparer<T> _comparer = null;
        private int _type = 0;

        private T[] _heap;
        private int _sz = 0;

        private int _count = 0;

        /// <summary>
        /// Priority Queue with custom comparer
        /// </summary>
        public PriorityQueue(int maxSize, IComparer<T> comparer)
        {
            _heap = new T[maxSize];
            _comparer = comparer;
        }

        /// <summary>
        /// Priority queue
        /// </summary>
        /// <param name="maxSize">max size</param>
        /// <param name="type">0: asc, 1:desc</param>
        public PriorityQueue(int maxSize, int type = 0)
        {
            _heap = new T[maxSize];
            _type = type;
        }

        private int Compare(T x, T y)
        {
            if (_comparer != null) return _comparer.Compare(x, y);
            return _type == 0 ? x.CompareTo(y) : y.CompareTo(x);
        }

        public void Push(T x)
        {
            _count++;

            //node number
            var i = _sz++;

            while (i > 0)
            {
                //parent node number
                var p = (i - 1) / 2;

                if (Compare(_heap[p], x) <= 0) break;

                _heap[i] = _heap[p];
                i = p;
            }

            _heap[i] = x;
        }

        public T Pop()
        {
            _count--;

            T ret = _heap[0];
            T x = _heap[--_sz];

            int i = 0;
            while (i * 2 + 1 < _sz)
            {
                //children
                int a = i * 2 + 1;
                int b = i * 2 + 2;

                if (b < _sz && Compare(_heap[b], _heap[a]) < 0) a = b;

                if (Compare(_heap[a], x) >= 0) break;

                _heap[i] = _heap[a];
                i = a;
            }

            _heap[i] = x;

            return ret;
        }

        public int Count()
        {
            return _count;
        }

        public T Peek()
        {
            return _heap[0];
        }

        public bool Contains(T x)
        {
            for (int i = 0; i < _sz; i++) if (x.Equals(_heap[i])) return true;
            return false;
        }

        public void Clear()
        {
            while (this.Count() > 0) this.Pop();
        }

        public IEnumerator<T> GetEnumerator()
        {
            var ret = new List<T>();

            while (this.Count() > 0)
            {
                ret.Add(this.Pop());
            }

            foreach (var r in ret)
            {
                this.Push(r);
                yield return r;
            }
        }

        public T[] ToArray()
        {
            T[] array = new T[_sz];
            int i = 0;

            foreach (var r in this)
            {
                array[i++] = r;
            }

            return array;
        }
   }
   class ABC123
   {
     public void SolveD(ConsoleInput cin)
        {
            var x = cin.ReadInt;
            var y = cin.ReadInt;
            var z = cin.ReadInt;
            var k = cin.ReadInt;
            var A = cin.ReadLongArray(x);
            var B = cin.ReadLongArray(y);
            var C = cin.ReadLongArray(z);
            var queue = new PriorityQueue<Tuple>(4 * k, 1);
            A = A.OrderByDescending(a => a).ToArray();
            B = B.OrderByDescending(b => b).ToArray();
            C = C.OrderByDescending(c => c).ToArray();
            queue.Push(new Tuple(A[0] + B[0] + C[0], 0, 0, 0));
            var pushTable = new Hashtable();
            pushTable.Add(new Push(0, 0, 0), true);
            for (int i = 0; i < k; i++)
            {
                var top = queue.Pop();
                WriteLine(top._sum);
                var noA = top._a;
                var noB = top._b;
                var noC = top._c;
                if (noA + 1 < A.Count() && pushTable[new Push(noA + 1, noB, noC)] == null)
                {
                    queue.Push(new Tuple(A[noA + 1] + B[noB] + C[noC], noA + 1, noB, noC));
                    pushTable.Add(new Push(noA + 1, noB, noC), true);
                    //WriteLine($"pushA={(A[noA + 1] + B[noB] + C[noC], noA + 1, noB, noC)}");
                }
                if (noB + 1 < B.Count() && pushTable[new Push(noA, noB + 1, noC)] == null)
                {
                    queue.Push(new Tuple(A[noA] + B[noB + 1] + C[noC], noA, noB + 1, noC));
                    pushTable.Add(new Push(noA, noB + 1, noC), true);
                    //WriteLine($"pushB={(A[noA] + B[noB + 1] + C[noC], noA, noB + 1, noC)}");
                }
                if (noC + 1 < C.Count() && pushTable[new Push(noA, noB, noC + 1)] == null)
                {
                    queue.Push(new Tuple(A[noA] + B[noB] + C[noC + 1], noA, noB, noC + 1));
                    pushTable.Add(new Push(noA, noB, noC + 1), true);
                    //WriteLine($"pushC={(A[noA] + B[noB] + C[noC + 1], noA, noB, noC + 1)}");
                }
            }
            ReadLine();
        }

        public class Tuple : IComparable
        {
            public long _sum { get; set; }
            public int _a { get; set; }
            public int _b { get; set; }
            public int _c { get; set; }
            public Tuple(long sum, int a, int b, int c)
            {
                _sum = sum;
                _a = a;
                _b = b;
                _c = c;
            }

            public int CompareTo(object o)
            {
                var comp = (Tuple)o;
                if (comp._sum > _sum) return -1;
                else if (comp._sum == _sum) return 0;
                else return 1;
            }

        }

        public struct Push
        {
            public int _a { get; set; }
            public int _b { get; set; }
            public int _c { get; set; }
            public Push(int a, int b, int c)
            {
                _a = a;
                _b = b;
                _c = c;
            }
        }
   }
}


Measured memory_bytes: 14816