import std.algorithm;
import std.container;
import std.conv;
import std.range;
import std.stdio;
import std.string;

long [] a;
long [] b;
long [] c;

struct Summand
{
	int u;
	int v;
	int w;

	@property auto value () const
	{
		return a[u] + b[v] + c[w];
	}

	@property auto id () const
	{
		return (u << 20) | (v << 10) | w;
	}

	int opCmp () (const auto ref Summand that) const
	{
		if (this.value != that.value)
		{
			return (this.value < that.value) -
			    (this.value > that.value);
		}
		return (this.id > that.id) - (this.id < that.id);
	}
}

void main ()
{
	int x, y, z, k;
	while (readf (" %s %s %s %s", &x, &y, &z, &k) > 0)
	{
		readln;
		a = readln.splitter.map !(to !(long)).array;
		b = readln.splitter.map !(to !(long)).array;
		c = readln.splitter.map !(to !(long)).array;
		sort !(q{a > b}) (a);
		sort !(q{a > b}) (b);
		sort !(q{a > b}) (c);

		auto t = redBlackTree !(Summand) ();
		t.insert (Summand (0, 0, 0));
		foreach (p; 0..k)
		{
			auto cur = t.front;
			writeln (cur.value);
			t.removeFront ();
			if (cur.u + 1 < x)
			{
				t.insert (Summand (cur.u + 1, cur.v, cur.w));
			}
			if (cur.v + 1 < y)
			{
				t.insert (Summand (cur.u, cur.v + 1, cur.w));
			}
			if (cur.w + 1 < z)
			{
				t.insert (Summand (cur.u, cur.v, cur.w + 1));
			}
		}
	}
}
