using System;
using static System.Console;
using static System.Math;
using System.IO;
using System.Collections.Generic;
namespace I_am_the_green_coder{
    class Inonoa{
        static void Main(){
            long[] xyzk = ILongs();
            long[][] abc = ILongLongs(3);

            long[] a = abc[0];
            long[] b = abc[1];
            long[] c = abc[2];

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

            bool[,,] moumita = new bool[a.Length,b.Length,c.Length];

            PriorityQueue<ComparableArray4> q = new PriorityQueue<ComparableArray4>();

            q.Enqueue(new ComparableArray4(a[a.Length-1]+b[b.Length-1]+c[c.Length-1],a.Length-1,b.Length-1,c.Length-1));
            moumita[a.Length-1,b.Length-1,c.Length-1] = true;

            int cnt = 0;

            while(cnt<xyzk[3]){
                ComparableArray4 ima = q.Dequeue();

                Console.WriteLine(ima[0]);
                cnt++;
                if(ima[1]>0 && !moumita[ima[1]-1,ima[2],ima[3]]){
                    q.Enqueue(new ComparableArray4(a[ima[1]-1]+b[ima[2]]+c[ima[3]],ima[1]-1,ima[2],ima[3]));
                    moumita[ima[1]-1,ima[2],ima[3]] = true;
                }
                if(ima[2]>0 && !moumita[ima[1],ima[2]-1,ima[3]]){
                    q.Enqueue(new ComparableArray4(a[ima[1]]+b[ima[2]-1]+c[ima[3]],ima[1],ima[2]-1,ima[3]));
                    moumita[ima[1],ima[2]-1,ima[3]] = true;
                }
                if(ima[3]>0 && !moumita[ima[1],ima[2],ima[3]-1]){
                    q.Enqueue(new ComparableArray4(a[ima[1]]+b[ima[2]]+c[ima[3]-1],ima[1],ima[2],ima[3]-1));
                    moumita[ima[1],ima[2],ima[3]-1] = true;
                }
            }
        }

        static readonly long MOD = 1000000007;

        ///<summary>a_1, a_2, a_3, ...みたいなの</summary>
        static long[] ILongs(){
            string[] s = ReadLine().Split();
            long[] re = new long[s.Length];
            for(long i=0;i<s.Length;i++){
                re[i] = long.Parse(s[i]);
            }
            return re;
        }

        ///<summary>xooxoxoxxoxo...みたいなの</summary>
        static char[] IChars(){
            return ReadLine().ToCharArray();
        }

        ///<summary>n m とかをちょっとはやくかくだけ</summary>
        static string[] IStrings(){
            return ReadLine().Split();
        }

        ///<summary>n行の入力を取ったり</summary>
        static long[][] ILongLongs(long n){
            long[][] re = new long[n][];
            for(long i=0;i<n;i++){
                string[] s = ReadLine().Split();
                re[i] = new long[s.Length];
                for(long j=0;j<s.Length;j++){
                    re[i][j] = long.Parse(s[j]);
                }
            }
            return re;
        }

        ///<summary>n行の文字列を取ったり</summary>
        static char[][] ICharsChars(long n){
            char[][] re = new char[n][];
            for(long i=0;i<n;i++){
                re[i] = ReadLine().ToCharArray();
            }
            return re;
        }
    }

    class ComparableArray4 : IComparable<ComparableArray4>{
        long[] val;

        public long this[int i]{
            get{
                return val[i];
            }
            set{
                val[i] = value;
            }
        }

        public int CompareTo(ComparableArray4 other){
            if(this[0] > other[0])return 1;
            if(this[0] < other[0])return -1;
            return 0;
        }

        public ComparableArray4(long first, long second, long third, long fourth){
            val = new long[4]{first,second,third,fourth};
        }
    }

    class PriorityQueue<T> where T : IComparable<T>{
        private List<T> list = new List<T>();

        public long Count{
            get{
                return list.Count;
            }
        }

        public void Enqueue(T elem){
            int c = list.Count;
            list.Add(elem);

            while(c!=0){
                int i = (c-1) /2;

                if(list[c].CompareTo(list[i])>0){
                    T tmp = list[c];
                    list[c] = list[i];
                    list[i] = tmp;
                }

                c = i;
            }
        }

        public T Dequeue(){
            int c = list.Count - 1;
            T pop = list[0];
            list[0] = list[c];
            list.RemoveAt(c);

            for(int i=0, j=1; j<c; ){
                if((j != c-1) && (list[j].CompareTo(list[j+1]) < 0)){
                    j ++;
                }

                if(list[i].CompareTo(list[j])<0){
                    T tmp = list[j];
                    list[j] = list[i];
                    list[i] = tmp;
                }

                i = j;
                j = 2*i + 1;
            }

            return pop;
        }
    }
}

Measured memory_bytes: 984408