import core.bitop;
import std.algorithm;
import std.ascii;
import std.bigint;
import std.conv;
import std.functional;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.random;
import std.typecons;
import std.container;

enum MAX = 1_000_100;
ulong MOD = 1_000_000_007;
ulong INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias Pass = Tuple!(long, "x", long, "y");

void main()
{
    long x, y, z, k;
    scan(x, y, z, k);
    auto a = aryread();
    auto b = aryread();
    auto c = aryread();

    auto ab = new long[](x * y);
    long tmp;
    foreach (i; iota(x))
        foreach (j; iota(y))
            ab[tmp++] = a[i] + b[j];
    ab.sort!"a > b"();
    ab = ab.take(min(k, ab.length));
    auto abc = new long[](k * z);
    tmp = 0;
    foreach (i; iota(ab.length))
        foreach (j; iota(z))
            abc[tmp++] = ab[i] + c[j];
    abc.sort!"a > b"();
    abc = abc.take(k);
    foreach (e; abc)
        e.writeln();
}

T lread(T = long)()
{
    return readln.chomp.to!T();
}

T[] aryread(T = long)()
{
    return readln.split.to!(T[])();
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
