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

namespace ABC123_D
{
    class Program
    {
        static long k;
        static long[] a, b, c;
        static bool[,,] used;
        static PriorityQueue<Model> queue;

        static void Main(string[] args)
        {
            var line = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var x = line[0];
            var y = line[1];
            var z = line[2];
            k = line[3];
            a = Console.ReadLine().Split().Select(long.Parse).ToArray();
            b = Console.ReadLine().Split().Select(long.Parse).ToArray();
            c = Console.ReadLine().Split().Select(long.Parse).ToArray();

            used = new bool[1001, 1001, 1001];

            Array.Sort(a);
            Array.Sort(b);
            Array.Sort(c);

            Array.Reverse(a);
            Array.Reverse(b);
            Array.Reverse(c);

            queue = new PriorityQueue<Model>(10001, 1);
            queue.Push(new Model(a[0] + b[0] + c[0], 0, 0, 0));
            used[0, 0, 0] = true;

            for (int i = 0; i < k; i++)
            {
                var p = queue.Pop();
                Console.WriteLine(p.Value);
                if (p.An < x - 1)
                {
                    if (!used[p.An + 1, p.Bn, p.Cn])
                    {
                        used[p.An + 1, p.Bn, p.Cn] = true;
                        var newM = new Model(a[p.An + 1] + b[p.Bn] + c[p.Cn], p.An + 1, p.Bn, p.Cn);
                        queue.Push(newM);
                    }
                }
                if (p.Bn < y - 1)
                {
                    if (!used[p.An, p.Bn + 1, p.Cn])
                    {
                        used[p.An, p.Bn + 1, p.Cn] = true;
                        var newM = new Model(a[p.An] + b[p.Bn + 1] + c[p.Cn], p.An, p.Bn + 1, p.Cn);
                        queue.Push(newM);
                    }
                }
                if (p.Cn < z - 1)
                {
                    if (!used[p.An, p.Bn, p.Cn + 1])
                    {
                        used[p.An, p.Bn, p.Cn + 1] = true;
                        var newM = new Model(a[p.An] + b[p.Bn] + c[p.Cn + 1], p.An, p.Bn, p.Cn + 1);
                        queue.Push(newM);
                    }
                }
            }
        }
    }

    public class Model : IComparable
    {
        public Model(long value, int an, int bn, int cn)
        {
            Value = value;
            An = an;
            Bn = bn;
            Cn = cn;
        }

        public long Value { get; set; }
        public int An { get; set; }
        public int Bn { get; set; }
        public int Cn { get; set; }

        public int CompareTo(object obj)
        {
            var o = (Model)obj;
            if (Value < o.Value) return -1;
            else if (Value == o.Value) return 0;
            else return 1;
        }
    }

    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;
        }
    }
}


Measured memory_bytes: 992972