namespace ABC123_D
{

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

    public struct Idx : IComparable
    {
        public override string ToString() => $"({X} {Y} {Z})";
        public Idx(int x, int y, int z)
        {
            X = x;
            Y = y;
            Z = z;
        }

        public int X { get; }
        public int Y { get; }
        public int Z { get; }

        public int CompareTo(object obj)
        {
            throw new NotImplementedException();
        }
    }
    public class Program
    {
        static void Main(string[] args)
        {
            var line1 = ReadInputsAsInt().ToList();
            var x = line1[0];
            var y = line1[1];
            var z = line1[2];
            var k = line1[3];

            var a = ReadInputsAsLong().ToList();
            var b = ReadInputsAsLong().ToList();
            var c = ReadInputsAsLong().ToList();

            var result = Solve(x, y, z, k, a, b, c);

            foreach (var item in result)
            {
                WriteLine(item);
            }
        }

        //static long Deliciousness()
        public static List<Idx> GetTree(Idx i)
        {
            if (i.X == 0 && i.Y == 0 && i.Z == 0) return new List<Idx> { i };

            if (i.X == 0 && i.Y == 0) return new List<Idx> { new Idx(i.X, i.Y, i.Z - 1) };
            if (i.Y == 0 && i.Z == 0) return new List<Idx> { new Idx(i.X - 1, i.Y, i.Z) };
            if (i.X == 0 && i.Z == 0) return new List<Idx> { new Idx(i.X, i.Y - 1, i.Z) };


            if (i.X == 0) return new List<Idx> { new Idx(i.X, i.Y, i.Z - 1), new Idx(i.X, i.Y - 1, i.Z) };
            if (i.Y == 0) return new List<Idx> { new Idx(i.X - 1, i.Y, i.Z), new Idx(i.X, i.Y, i.Z - 1) };
            if (i.Z == 0) return new List<Idx> { new Idx(i.X - 1, i.Y, i.Z), new Idx(i.X, i.Y - 1, i.Z) };

            return new List<Idx>
            {
                new Idx(i.X, i.Y - 1, i.Z),
                new Idx(i.X, i.Y, i.Z - 1),
                new Idx(i.X - 1, i.Y, i.Z)
            };
        }

        public static IEnumerable<long> Solve(int x, int y, int z, int k,
            List<long> a, List<long> b, List<long> c)
        {
            a.Sort();
            b.Sort();
            c.Sort();

            int lines = k;//Math.Min(k, x * y * z);

            x--; y--; z--;

            //yield return a[x] + b[y] + c[z];
            //int p = x;
            //int q = y;
            //int r = z;

            Func<Idx, long> delicious = (Idx _idx) => a[_idx.X] + b[_idx.Y] + c[_idx.Z];


            var vidited = new List<Idx>();
            //var queue = new SortedSet<Idx>();
            var queue = new List<Idx>();



            vidited.Add(new Idx(x, y, z));
            queue.Add(new Idx(x, y, z));

            for (int i = 0; i < lines; i++)
            {
                var node = queue[0]; queue.RemoveAt(0);
                var dei = delicious(node);
                yield return dei;

                var tree = GetTree(node);
                foreach (var child in tree)
                {
                    if (!vidited.Contains(child))
                    {
                        vidited.Add(child);

                        //queue.Add(child);
                        //queue.Sort((item1, item2) => delicious(item1) < delicious(item2) ? 1 : -1);
                        int j = 0;
                        for (; j < queue.Count; j++)
                        {
                            if (delicious(queue[j]) > delicious(child))
                            {
                                continue;
                            }
                            else
                            {
                                break;
                            }
                        }

                        queue.Insert(j, child);
                    }
                }

                #region moto
                /*
                if (x == 0 && y == 0) { z--; continue; }
                if (y == 0 && z == 0) { x--; continue; }
                if (x == 0 && z == 0) { y--; continue; }

                if (x == 0)
                {
                    if (a[x] + b[y - 1] + c[z] < a[x] + b[y] + c[z - 1])
                    {
                        z--;
                    }
                    else
                    {
                        y--;
                    }
                }
                else if (y == 0)
                {
                    if (a[x - 1] + b[y] + c[z] < a[x] + b[y] + c[z - 1])
                    {
                        z--;
                    }
                    else
                    {
                        x--;
                    }
                }
                else if (z == 0)
                {
                    if (a[x - 1] + b[y] + c[z] < a[x] + b[y - 1] + c[z])
                    {
                        if (a[x] + b[y - 1] + c[z] < a[x] + b[y] + c[z - 1])
                        {
                            z--;
                        }
                        else
                        {
                            y--;
                        }
                    }
                }
                else
                {
                    // --x,y,zがいずれも最小になっていない
                    if (a[x - 1] + b[y] + c[z] < a[x] + b[y - 1] + c[z])
                    {
                        if (a[x] + b[y - 1] + c[z] < a[x] + b[y] + c[z - 1])
                        {
                            z--;
                        }
                        else
                        {
                            y--;
                        }
                    }
                    else
                    {
                        x--;
                    }
                }
                */
                #endregion

            }
        }


        static IEnumerable<int> ReadInputsAsInt() => ReadLine().Split(' ').Select(x => int.Parse(x));
        static IEnumerable<long> ReadInputsAsLong() => ReadLine().Split(' ').Select(x => long.Parse(x));

        static IEnumerable<string> ReadLines(int n)
        {
            for (int i = 0; i < n; i++) yield return ReadLine();
        }
    }
}

Measured memory_bytes: 20552