import std.algorithm;
import std.bigint;
import std.concurrency;
import std.container;
import std.conv;
import std.functional;
import std.format;
import std.math;
import std.meta;
import std.numeric;
import std.random;
import std.range;
import std.stdio;
import std.string;
import std.traits;
import std.typecons;


auto solve(long X, long Y, long Z, long K, long[] A, long[] B, long[] C) {
    alias Vec3 = Tuple!(size_t, size_t, size_t);
    alias Cake = Tuple!(long, "value", Vec3, "pos");
    
    A = A.sort!"a > b".array;
    B = B.sort!"a > b".array;
    C = C.sort!"a > b".array;

    auto heap = make!(RedBlackTree!(Cake, "a > b"));
    auto done = make!(RedBlackTree!Vec3);
    
    heap.insert(Cake(A[0] + B[0] + C[0], Vec3(0, 0, 0)));
    done.insert(Vec3(0, 0, 0));

    const calcValue = (Vec3 v) => A[v[0]] + B[v[1]] + C[v[2]];

    foreach (_; 0 .. K) {
        auto c = heap.front;
        heap.removeFront;
        writeln(c.value);

        auto na = Vec3(c.pos[0] + 1, c.pos[1], c.pos[2]);
        if (c.pos[0] + 1 < X && !(na in done)) {
            heap.insert(Cake(calcValue(na), na));
            done.insert(na);
        }
        
        auto nb = Vec3(c.pos[0], c.pos[1] + 1, c.pos[2]);
        if (c.pos[1] + 1 < X && !(nb in done)) {
            heap.insert(Cake(calcValue(nb), nb));
            done.insert(nb);
        }
        
        auto nc = Vec3(c.pos[0], c.pos[1], c.pos[2] + 1);
        if (c.pos[2] + 1 < X && !(nc in done)) {
            heap.insert(Cake(calcValue(nc), nc));
            done.insert(nc);
        }
    }
}


void main() {
    auto input = stdin.byLine.map!split.joiner;

    long X;
    X = input.front.to!long;
    input.popFront;

    long Y;
    Y = input.front.to!long;
    input.popFront;

    long Z;
    Z = input.front.to!long;
    input.popFront;

    long K;
    K = input.front.to!long;
    input.popFront;

    long[] A = new long[](cast(size_t) (X));
    foreach (i; 0 .. cast(size_t) (X)) {
        A[i] = input.front.to!long;
        input.popFront;
    }

    long[] B = new long[](cast(size_t) (Y));
    foreach (i; 0 .. cast(size_t) (Y)) {
        B[i] = input.front.to!long;
        input.popFront;
    }

    long[] C = new long[](cast(size_t) (Z));
    foreach (i; 0 .. cast(size_t) (Z)) {
        C[i] = input.front.to!long;
        input.popFront;
    }

    static if (is(ReturnType!solve == void))
        solve(X, Y, Z, K, A, B, C);
    else
        solve(X, Y, Z, K, A, B, C).writeln;
}
