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[]).sort().array, B = readln.split.to!(long[]).sort().array, C = readln.split.to!(long[]).sort().array;
	
	alias tri = Tuple!(long, long, long);
	tri[][] diff = [[tri(X-1,Y-1,Z-1)]];
	tri[] diffs = [ tri(X-1, Y-1, Z-1) ];
	
	while(true) {
		bool[tri] res;
		//writeln(diff);
		foreach (t; diff[$-1]) {
			//writeln(t);
			if (t[0] > 0) res[tri(t[0]-1, t[1], t[2])] = true;
			if (t[1] > 0) res[tri(t[0], t[1]-1, t[2])] = true;
			if (t[2] > 0) res[tri(t[0], t[1], t[2]-1)] = true;
		}
		diff ~= res.keys;
		diffs ~= res.keys;
		if (diffs.length >= K) break;
		
	}
	
	
	//writeln(diffs);
	
	foreach (ans; map!(t => A[t[0]] + B[t[1]] + C[t[2]])(diffs).array.sort!"a>b"().array[0 .. K] ) {
		writeln(ans);
	}
}
