import std.stdio, std.range, std.conv, std.string, std.array, std.functional, std.math;
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 main()
{
    auto input = readln().split.to!(int[]);
    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[] abList;
    foreach(a; aList)
    {
        foreach(b; bList)
        {
            abList ~= a+b;
        }
    }
    abList.sort!greaterThan;
    abList.length = min(abList.length, 3000);

    long[] abcList;
    foreach(ab; abList)
    {
        foreach(c; cList)
        {
            abcList ~= ab + c;
        }
    }
    abcList.sort!greaterThan;
    foreach(n; abcList[0..K])
    {
        writeln(n);
    }
}
