using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC123
{
    class Program
    {
        static void Main(string[] args)
        {
            // FiveAntennas(); // 25min
            // FiveDishes(); // 35min
            // FiveTransportation(); // 1h11m
            //Cake123_old();
            Cake123();
        }

        private class DataEqualityComparer : IEqualityComparer<Data>
        {
            public bool Equals(Data x, Data y)
            {
                return x.Indexes[0] == y.Indexes[0] &&
                       x.Indexes[1] == y.Indexes[1] &&
                       x.Indexes[2] == y.Indexes[2];
            }

            public int GetHashCode(Data obj)
            {
                return obj.Indexes[0] + obj.Indexes[1] + obj.Indexes[2];
            }
        }

        private class Data : IComparable<Data>
        {
            public long Value { get; set; }
            public int[] Indexes { get; set; }

            public Data(long value, int[] indexes)
            {
                Value = value;
                Indexes = indexes;
            }

            public int CompareTo(Data other)
            {
                return Value.CompareTo(other.Value);
            }
        }

        public static void Cake123()
        {
            int[] N = new int[3];
            int[] tmp = ReadIntArray();
            for (int i = 0; i < 3; i++)
            {
                N[i] = tmp[i];
            }
            int K = tmp[3];

            List<long[]> v = new List<long[]>();
            v.Add(ReadLongArray());
            v.Add(ReadLongArray());
            v.Add(ReadLongArray());

            ReverseSort(v[0]);
            ReverseSort(v[1]);
            ReverseSort(v[2]);

            PriorityQueue<Data> que = new PriorityQueue<Data>(K*3, 1);
            HashSet<Data> set = new HashSet<Data>(new DataEqualityComparer());

            Data first = new Data(v[0][0] + v[1][0] + v[2][0], new int[] { 0, 0, 0 });
            que.Push(first);

            for (int k = 0; k < K; k++)
            {
                var data = que.Pop();
                Console.WriteLine(data.Value);

                // 次の3候補
                for (int i = 0; i < 3; i++)
                {
                    if (data.Indexes[i] + 1 < N[i])
                    {
                        var sum = data.Value
                            - v[i][data.Indexes[i]]
                            + v[i][data.Indexes[i] + 1];
                        int[] num = new int[3];
                        data.Indexes.CopyTo(num,0);
                        num[i]++;
                        var d = new Data(sum, num);

                        if (!set.Contains(d))
                        {
                            set.Add(d);
                            que.Push(d);
                        }
                    }
                }
            }
        }

        public static void Cake123_old()
        {
            int[] tmp = ReadIntArray();
            int k = tmp[3];
            int x = Math.Min(tmp[0],k);
            int y = Math.Min(tmp[1],k);
            int z = Math.Min(tmp[2],k);

            long[] aa = ReadLongArray();
            long[] bb = ReadLongArray();
            long[] cc = ReadLongArray();

            // aとbの合計だけを計算してeとする
            int e = x*y;
            long[] ee = new long[e];
            for (int i = 0; i < x; i++)
            {
                for (int j = 0; j < y; j++)
                {
                    ee[y * i + j] = aa[i] + bb[j];
                }
            }

            ReverseSort(ee);
            int e2 = Math.Min(e, k);
            long[] ans = new long[e2*z];
            for (int i = 0; i < e2; i++)
            {
                for (int j = 0; j < z; j++)
                {
                    ans[z * i + j] = ee[i] + cc[j];
                }
            }

            ReverseSort(ans);
            for (int i = 0; i < k; i++)
            {
                Console.WriteLine(ans[i]);
            }
        }

        public static void FiveTransportation()
        {
            long n = ReadLong();
            long[] time = new long[5];
            for (int i = 0; i < 5; i++)
            {
                time[i] = ReadLong();
            }

            long min = time.Min();

            long ans = (long)Math.Ceiling(n * 1.0m / min) + 4;

            Console.WriteLine(ans);
        }

        public static void FiveDishes()
        {
            int[] dishes = new int[5];
            for(int i = 0; i < 5; i++)
            {
                dishes[i] = ReadInt();
            }

            dishes = dishes.OrderByDescending(i => i % 10 == 0 ? 10 : i % 10).ToArray();

            int ans = 0;
            for(int i = 0; i < 4; i++)
            {
                ans += (int)Math.Ceiling(dishes[i] / 10m) * 10;
            }

            ans += dishes[4];

            Console.WriteLine(ans);
        }

        public static void FiveAntennas()
        {
            int[] antennas = new int[5];
            for(int i = 0; i < 5; i++)
            {
                antennas[i] = ReadInt();
            }

            int k = ReadInt();

            string ans = "Yay!";
            if (antennas[0] + k < antennas[4])
            {
                ans = ":(";
            }

            Console.WriteLine(ans);
        }

        #region util

        public static void ReverseSort<T>(T[] array)
        {
            Array.Sort<T>(array);
            Array.Reverse(array);
        }

        public static int[] ReadBinaryString()
        {
            return Console.ReadLine().Select(c => int.Parse(c.ToString())).ToArray();
        }

        public static bool[] ReadBoolArray()
        {
            return Console.ReadLine().Select(c => c == '1').ToArray();
        }

        public static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }
        public static long[] ReadLongArray()
        {
            return Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        public static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int[] ReadIntArray()
        {
            return Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        #endregion
    }

    public class PriorityQueue<T> where T : IComparable<T>
    {
        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;
        }

        public PriorityQueue(int maxSize, IComparer<T> comparer, int type = 0)
        {
            _heap = new T[maxSize];
            _comparer = comparer;
            _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: 14432