import std.stdio;
import std.conv;
import std.array;
import std.range;
import std.algorithm;

void main()
{
    auto buf = readln.split;
    int X = buf[0].to!int;
    int Y = buf[1].to!int;
    int Z = buf[2].to!int;
    int K = buf[3].to!int;

    long[] A = readln.split.to!(long[]);
    long[] B = readln.split.to!(long[]);
    long[] C = readln.split.to!(long[]);

    sort!("a > b")(A);
    sort!("a > b")(B);
    sort!("a > b")(C);

    long[] ans;

    int[] candidate = [0];

    ulong max_i, next_i;
    long max_v, v;
    int src;
    while (ans.length < K){
        max_v = 0;
        foreach (i; 0..candidate.length){
            v = A[candidate[i] / 1000000] + B[candidate[i] / 1000 % 1000] + C[candidate[i] % 1000];
            if (v > max_v){
                max_v = v;
                max_i = i;
            }
        }

        ans ~= max_v;
        src = candidate[max_i];
        int[] nexts;
        if (src / 1000000 + 1 < A.length) nexts ~= src + 1000000;
        if (src / 1000 % 1000 + 1 < B.length) nexts ~= src + 1000;
        if (src % 1000 + 1 < C.length) nexts ~= src + 1;
        foreach (next; nexts){
            next_i = candidate.assumeSorted().lowerBound(next).length;
            if (candidate.length <= next_i || candidate[next_i] != next) candidate.insertInPlace(next_i, next);
        }
        candidate = remove(candidate, max_i);
    }

    foreach (n; ans) writeln(n);
}

