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

class MainClass : Scanner
{
    static int X;
    static int Y;
    static int Z;
    static int K;
    static long[] A;
    static long[] B;
    static long[] C;
    static void Main()
    {
        (X, Y, Z, K) = ReadTuple<int,int,int,int>();
        A = RLongs();
        B = RLongs();
        C = RLongs();

        Array.Sort(A);
        Array.Sort(B);
        Array.Sort(C);

        var max = long.MaxValue;
        var (lb, ub) = (-1L, 40000000000L);
        while (ub - lb > 1)
        {
            var mid = (lb + ub) / 2;
            if (check(mid)>K) lb = mid;
            else ub = mid;
        }
        max = lb;

        var Ans = new List<long>();
        for (int i = 0; i < X; i++)
        {
            for (int j = 0; j < Y; j++)
            {
                for (int k = Z - 1; k >= 0; k--)
                {
                    long sum = A[i] + B[j] + C[k];
                    if (sum < max) break;
                    Ans.Add(sum);
                }
            }
        }
        Ans.Sort();
        Ans.Reverse();
        for (int i = 0; i < Min(3000,K); i++)
        {
            WriteLine(Ans[i]);
        }
    }
    static int check(long mid)
    {
        int ans = 0;
        for (int i = 0; i < X; i++)
        {
            for (int j = 0; j < Y; j++)
            {
                var (lb, ub) = (-1, Z);
                while (ub - lb > 1)
                {
                    var mid2 = (lb + ub) / 2;
                    if (A[i]+B[j] + C[mid2]<mid) lb = mid2;
                    else ub = mid2;
                }
                ans += Z-ub;
            }
        }
        return ans;
    }
}



class Scanner
{
    public static string RString() => Console.ReadLine();
    public static int RInt() => ReadTuple<int>();
    public static long RLong() => ReadTuple<long>();
    public static double RDouble() => ReadTuple<double>();

    public static string[] RStrings() => Console.ReadLine().Split();
    public static int[] RInts() => Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
    public static long[] RLongs() => Array.ConvertAll(Console.ReadLine().Split(), long.Parse);
    public static double[] RDoubles() => Array.ConvertAll(Console.ReadLine().Split(), double.Parse);
    public static int[] RInts(Func<string, int> func) => Console.ReadLine().Split().Select(func).ToArray();
    public static long[] RLongs(Func<string, long> func) => Console.ReadLine().Split().Select(func).ToArray();
    public static double[] RDoubles(Func<string, double> func) => Console.ReadLine().Split().Select(func).ToArray();
    //public static string[] RStrings(Func<string, string> func) => Console.ReadLine().Split().Select(func).ToArray();

    public static T1 ReadTuple<T1>()
    {
        var r = RString();
        var r1 = (T1)Convert.ChangeType(r, typeof(T1));
        return r1;
    }
    public static (T1, T2) ReadTuple<T1, T2>()
    {
        var r = RStrings();
        var r1 = (T1)Convert.ChangeType(r[0], typeof(T1));
        var r2 = (T2)Convert.ChangeType(r[1], typeof(T2));
        return (r1, r2);
    }
    public static (T1, T2, T3) ReadTuple<T1, T2, T3>()
    {
        var r = RStrings();
        var r1 = (T1)Convert.ChangeType(r[0], typeof(T1));
        var r2 = (T2)Convert.ChangeType(r[1], typeof(T2));
        var r3 = (T3)Convert.ChangeType(r[2], typeof(T3));
        return (r1, r2, r3);
    }
    public static (T1, T2, T3, T4) ReadTuple<T1, T2, T3, T4>()
    {
        var r = RStrings();
        var r1 = (T1)Convert.ChangeType(r[0], typeof(T1));
        var r2 = (T2)Convert.ChangeType(r[1], typeof(T2));
        var r3 = (T3)Convert.ChangeType(r[2], typeof(T3));
        var r4 = (T4)Convert.ChangeType(r[3], typeof(T4));
        return (r1, r2, r3, r4);
    }
}


Measured memory_bytes: 238700