import std.stdio : readln, writeln;
import std.string : split;
import std.conv : to;
import std.algorithm : sort;
import std.container : Array, BinaryHeap, RedBlackTree;
import std.typecons : Tuple;

void main()
{
    long X, Y, Z, K;
    {
        auto tmp = readln().split().to!(long[])();
        X = tmp[0];
        Y = tmp[1];
        Z = tmp[2];
        K = tmp[3];
    }
    auto A = readln().split().to!(long[])();
    auto B = readln().split().to!(long[])();
    auto C = readln().split().to!(long[])();
    A.sort!"b<a"();
    B.sort!"b<a"();
    C.sort!"b<a"();

    alias vec3 = Tuple!(long, long, long);
    alias cake = Tuple!(long, vec3);

    auto PQ = BinaryHeap!(Array!cake)();
    PQ.insert(cake(A[0] + B[0] + C[0], vec3(0, 0, 0)));

    auto set = new RedBlackTree!vec3();
    set.insert(vec3(0, 0, 0));

    foreach (_; 0 .. K)
    {
        auto c = PQ.front;
        PQ.removeFront();

        writeln(c[0]);
        auto v = c[1];

        if (v[0] + 1 < X && vec3(v[0] + 1, v[1], v[2]) !in set)
        {
            PQ.insert(cake(A[v[0] + 1] + B[v[1]] + C[v[2]], vec3(v[0] + 1, v[1], v[2])));
            set.insert(vec3(v[0] + 1, v[1], v[2]));
        }

        if (v[1] + 1 < Y && vec3(v[0], v[1] + 1, v[2]) !in set)
        {
            PQ.insert(cake(A[v[0]] + B[v[1] + 1] + C[v[2]], vec3(v[0], v[1] + 1, v[2])));
            set.insert(vec3(v[0], v[1] + 1, v[2]));
        }

        if (v[2] + 1 < Z && vec3(v[0], v[1], v[2] + 1) !in set)
        {
            PQ.insert(cake(A[v[0]] + B[v[1]] + C[v[2] + 1], vec3(v[0], v[1], v[2] + 1)));
            set.insert(vec3(v[0], v[1], v[2] + 1));
        }

    }
}
