import std.algorithm;
import std.array;
import std.container;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

alias D = Tuple!(long, "sum", int, "i", int, "j", int, "k");

void main() {
    auto xs = readints;
    int x = xs[0], y = xs[1], z = xs[2], kk = xs[3];
    auto a = reads!long;
    auto b = reads!long;
    auto c = reads!long;

    a.sort!("a > b");
    b.sort!("a > b");
    c.sort!("a > b");
    auto pq = new BinaryHeap!(Array!D);
    bool[Tuple!(int, int, int)] used;
    pq.insert(D(a[0] + b[0] + c[0], 0, 0, 0));
    while (kk > 0) {
        auto d = pq.front;
        pq.popFront();
        if (tuple(d.i, d.j, d.k) in used) continue;

        writeln(d.sum);
        used[tuple(d.i, d.j, d.k)] = true;
        kk--;

        int i = d.i;
        int j = d.j;
        int k = d.k;
        if (i + 1 < a.length)
            pq.insert(D(a[i + 1] + b[j] + c[k], i + 1, j, k));
        if (j + 1 < b.length)
            pq.insert(D(a[i] + b[j + 1] + c[k], i, j + 1, k));
        if (k + 1 < c.length)
            pq.insert(D(a[i] + b[j] + c[k + 1], i, j, k + 1));
    }
}
