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

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

		auto getBest ()
		{
			long [] d;
			d.reserve (u * v * w);
			auto m = min (k, u * v * w);
			foreach (p; 0..u)
			{
				foreach (q; 0..v)
				{
					foreach (r; 0..w)
					{
						d ~= a[p] + b[q] + c[r];
					}
				}
			}
			partialSort !(q{a > b}) (d, m);
			return d[0..m];
		}

		auto prev = getBest ();
		bool ok;
		do
		{
			ok = false;

			if (u < a.length)
			{
				u += 1;
				auto next = getBest ();
				if (prev != next)
				{
					ok = true;
					prev = next;
				}
				else
				{
					u -= 1;
				}	
			}

			if (v < b.length)
			{
				v += 1;
				auto next = getBest ();
				if (prev != next)
				{
					ok = true;
					prev = next;
				}
				else
				{
					v -= 1;
				}	
			}

			if (w < c.length)
			{
				w += 1;
				auto next = getBest ();
				if (prev != next)
				{
					ok = true;
					prev = next;
				}
				else
				{
					w -= 1;
				}	
			}
		}
		while (ok);

		writefln ("%(%s\n%)", prev);
	}
}
