using System;
using System.Collections.Generic;
using System.Linq;
using BitArray = System.Collections.BitArray;
using BigInteger = System.Numerics.BigInteger;

namespace AtCoderProject
{
    struct Index
    {
        public int a;
        public int b;
        public int c;
    }
    static class DicExt
    {
        public static V GetOrDefault<K, V>(this IDictionary<K, V> dic, K key, V defaultValue = default(V))
        {
            V val;
            if (dic.TryGetValue(key, out val))
                return val;
            dic.Add(key, defaultValue);
            return defaultValue;
        }
    }
    public class Program
    {
        public object Calc()
        {
            var line = consoleReader.SplitInt32();
            var X = line[0];
            var Y = line[1];
            var Z = line[2];
            var K = line[3];

            var A = consoleReader.SplitInt64().OrderByDescending(i => i).ToArray();
            var B = consoleReader.SplitInt64().OrderByDescending(i => i).ToArray();
            var C = consoleReader.SplitInt64().OrderByDescending(i => i).ToArray();

            return MultiLine(Calc(A, B, C).Take(K));
        }

        IEnumerable<long> Calc(long[] A, long[] B, long[] C)
        {
            var index = new Index();
            var cache = new SortedList<long, Queue<Index>>(Comparer<long>.Create((x, y) => Math.Sign(y - x)));
            var sumi = new HashSet<Index>(new[] { index });
            cache.Add(A[0] + B[0] + C[0], new Queue<Index>(sumi));

            while (cache.Count > 0)
            {
                yield return cache.Keys[0];
                var indexQueue = cache.Values[0];
                index = indexQueue.Dequeue();
                if (indexQueue.Count == 0)
                    cache.RemoveAt(0);

                if (index.a < A.Length - 1)
                {
                    var newIndex = index;
                    newIndex.a++;
                    if (sumi.Add(newIndex))
                    {
                        var val = A[newIndex.a] + B[newIndex.b] + C[newIndex.c];
                        var queue = cache.GetOrDefault(val, new Queue<Index>());
                        queue.Enqueue(newIndex);
                    }
                }
                if (index.b < B.Length - 1)
                {
                    var newIndex = index;
                    newIndex.b++;
                    if (sumi.Add(newIndex))
                    {
                        var val = A[newIndex.a] + B[newIndex.b] + C[newIndex.c];
                        var queue = cache.GetOrDefault(val, new Queue<Index>());
                        queue.Enqueue(newIndex);
                    }
                }
                if (index.c < C.Length - 1)
                {
                    var newIndex = index;
                    newIndex.c++;
                    if (sumi.Add(newIndex))
                    {
                        var val = A[newIndex.a] + B[newIndex.b] + C[newIndex.c];
                        var queue = cache.GetOrDefault(val, new Queue<Index>());
                        queue.Enqueue(newIndex);
                    }
                }
            }
        }


        const int mod = 1000000007;
        private readonly ConsoleReader consoleReader;
        public Program() : this(new ConsoleReader()) { }
        public Program(ConsoleReader consoleReader) { this.consoleReader = consoleReader; }
        static void Main() => Console.WriteLine(new Program().Calc());
        public static string MultiLine<T>(IEnumerable<T> source) => string.Join("\n", source);
    }

    public class ConsoleReader
    {
        public virtual string String() => Console.ReadLine();
        public int Int32() => int.Parse(String());
        public long Int64() => long.Parse(String());
        public ulong UInt64() => ulong.Parse(String());
        public double Double() => double.Parse(String());
        public string[] Split() => String().Split().ToArray();
        public int[] SplitInt32() => String().Split().Select(int.Parse).ToArray();
        public long[] SplitInt64() => String().Split().Select(long.Parse).ToArray();
        public ulong[] SplitUInt64() => String().Split().Select(ulong.Parse).ToArray();
        public double[] SplitDouble() => String().Split().Select(double.Parse).ToArray();

        public IEnumerable<string> Repeat(int count)
        {
            for (int i = 0; i < count; i++)
                yield return String();
        }
        public IEnumerable<int> RepeatInt32(int count)
        {
            for (int i = 0; i < count; i++)
                yield return Int32();
        }
        public IEnumerable<long> RepeatInt64(int count)
        {
            for (int i = 0; i < count; i++)
                yield return Int64();
        }
        public IEnumerable<string[]> RepeatSplit(int count)
        {
            for (int i = 0; i < count; i++)
                yield return Split();
        }
        public IEnumerable<int[]> RepeatSplitInt32(int count)
        {
            for (int i = 0; i < count; i++)
                yield return SplitInt32();
        }
    }
}


Measured memory_bytes: 19276