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 Cake = Tuple!(long, "value", size_t, "a", size_t, "b", size_t, "c");
    
    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"));
    
    heap.insert(Cake(A[0] + B[0] + C[0], 0, 0, 0));

    foreach (i; 0 .. K) {
        auto c = heap.front;
        heap.removeFront;
        writeln(c.value);
        if (c.a + 1 < X)
            heap.insert(Cake(A[c.a + 1] + B[c.b] + C[c.c], c.a + 1, c.b, c.c));
        if (c.b + 1 < Y)
            heap.insert(Cake(A[c.a] + B[c.b + 1] + C[c.c], c.a, c.b + 1, c.c));
        if (c.c + 1 < Z)
            heap.insert(Cake(A[c.a] + B[c.b] + C[c.c + 1], c.a, c.b, c.c + 1));
    }
}


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