import std.stdio;
import std.conv;
import std.array;
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[]);

    long[] value;
    foreach (a; A){
        foreach (b; B){
            foreach (c; C){
                value ~= a + b + c;
            }
        }
    }

    // selection sort
    ulong len = value.length;
    foreach (i; 0..K){
        ulong max_j = i;
        foreach (j; (i + 1)..len){
            if (value[j] > value[max_j]) max_j = j;
        }
        swap(value[i], value[max_j]);
    }

    foreach (i; 0..K){
        writeln(value[i]);
    }
}

