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;

alias Cake = Tuple!(long, "sum", long, "one", long, "two", long, "three");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

void main()
{
    long x, y, z, k, cnt;
    scan(x, y, z, k);
    auto a = aryread();
    auto b = aryread();
    auto c = aryread();
    a.sort!"a>b"(), b.sort!"a>b"(), c.sort!"a>b"();
    PQueue!(Cake, "a.sum < b.sum") pq;
    auto check = new long[][][](k, k, k);
    auto ans = new long[](k);

    pq.insert(Cake(a[0] + b[0] + c[0], 0, 0, 0));
    while (cnt < k)
    {
        long s = pq.front.one, t = pq.front.two, u = pq.front.three;
        ans[cnt] = pq.front.sum;
        pq.removeFront();
        if (s + 1 < x && !check[s + 1][t][u])
        {
            pq.insert(Cake(a[s + 1] + b[t] + c[u], s + 1, t, u));
            check[s + 1][t][u]++;
        }
        if (t + 1 < y && !check[s][t + 1][u])
        {
            pq.insert(Cake(a[s] + b[t + 1] + c[u], s, t + 1, u));
            check[s][t + 1][u]++;
        }
        if (u + 1 < z && !check[s][t][u + 1])
        {
            pq.insert(Cake(a[s] + b[t] + c[u + 1], s, t, u + 1));
            check[s][t][u + 1]++;
        }
        cnt++;
    }
    foreach (e; ans)
        e.writeln();
}

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;
    }
}
