import std.stdio, std.range, std.conv, std.string, std.array, std.functional, std.math, std.regex, std.file, std.range, std.traits;
import std.algorithm.comparison, std.algorithm.iteration, std.algorithm.mutation, std.algorithm.searching, std.algorithm.setops, std.algorithm.sorting;
import std.container.binaryheap;
import std.typecons; 

void resolve()
{
    auto input = readln().split.to!(long[]);
    auto X = input[0];
    auto Y = input[1];
    auto Z = input[2];
    auto K = input[3];

    auto aList = readln().split.to!(long[]);
    auto bList = readln().split.to!(long[]);
    auto cList = readln().split.to!(long[]);
    long[] list;
    foreach(a: 0..aList.length)
    {
        foreach(b: 0..bList.length)
        {
            if(a*b > K) break;
            foreach(c: 0..cList.length)
            {
                if(a*b*c > K) break;
                list ~= aList[a] + bList[b] + cList[c];
            }
        }
    }
    sort!"a>b"(list);
    foreach(i: 0..K)
    {
        writeln(list[i]);
    }
}