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

void main() {
	auto data = readln.split.to!(long[]);
	auto X = data[0], Y = data[1], Z = data[2], K = data[3];
	auto A = readln.split.to!(long[]), B = readln.split.to!(long[]), C = readln.split.to!(long[]);
	
    long[] _AB;
    foreach (b; B) {
        _AB ~= A.map!(x => x+b).array;
    }
    //writeln(_AB);
    auto AB = _AB.sort!"a>b"().array[0 .. min(K, $)];
    //writeln(AB);
    
    long[] ans;
    foreach (c; C) {
        ans ~= AB.map!(x => x+c).array;
    }
    ans.sort!"a>b"().array[0 .. min(K, $)].each!writeln;
}

