unittest
{
	assert( [ "2 2 2 8", "4 6", "1 5", "3 8" ].solve == "19\n17\n15\n14\n13\n12\n10\n8" );
	assert( [ "3 3 3 5", "1 10 100", "2 20 200", "1 10 100" ].solve == "400\n310\n310\n301\n301" );
	assert( [ "10 10 10 20", "7467038376 5724769290 292794712 2843504496 3381970101 8402252870 249131806 6310293640 6690322794 6082257488", "1873977926 2576529623 1144842195 1379118507 6003234687 4925540914 3902539811 3326692703 484657758 2877436338", "4975681328 8974383988 2882263257 7690203955 514305523 6679823484 4263279310 585966808 3752282379 620585736" ].solve == "23379871545\n22444657051\n22302177772\n22095691512\n21667941469\n21366963278\n21287912315\n21279176669\n21160477018\n21085311041\n21059876163\n21017997739\n20703329561\n20702387965\n20590247696\n20383761436\n20343962175\n20254073196\n20210218542\n20150096547" );
}



import std.algorithm;
import std.container;
import std.conv;
import std.format;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto x = 0L;
	auto y = 0L;
	auto z = 0L;
	auto k = 0L;
	input.front.formattedRead!"%s %s %s %s"( x, y, z, k );
	input.popFront;
	auto as = input.front.split.to!( long[] ) ~ long.min / 4;
	input.popFront;
	auto bs = input.front.split.to!( long[] ) ~ long.min / 4;
	input.popFront;
	auto cs = input.front.split.to!( long[] ) ~ long.min / 4;
	as.sort!( ( a, b ) => b < a );
	bs.sort!( ( a, b ) => b < a );
	cs.sort!( ( a, b ) => b < a );
	
	auto anss = new long[ k ];
	auto queue = heapify( [ tuple( as[ 0 ] + bs[ 0 ] + cs[ 0 ], 0L, 0L, 0L ) ] );
	auto us = new bool[][][]( as.length, bs.length, cs.length );
	us[ 0 ][ 0 ][ 0 ] = true;
	foreach( ref ans; anss )
	{
		auto v = queue.front[ 0 ];
		auto ai = queue.front[ 1 ];
		auto bi = queue.front[ 2 ];
		auto ci = queue.front[ 3 ];
		queue.removeFront;
		
		ans = v;
		if( !us[ ai + 1 ][ bi ][ ci ] )
		{
			queue.insert( tuple( as[ ai + 1 ] + bs[ bi ] + cs[ ci ], ai + 1, bi, ci ) );
			us[ ai + 1 ][ bi ][ ci ] = true;
		}
		if( !us[ ai ][ bi + 1 ][ ci ] )
		{
			queue.insert( tuple( as[ ai ] + bs[ bi + 1 ] + cs[ ci ], ai, bi + 1, ci ) );
			us[ ai ][ bi + 1 ][ ci ] = true;
		}
		if( !us[ ai ][ bi ][ ci + 1 ] )
		{
			queue.insert( tuple( as[ ai ] + bs[ bi ] + cs[ ci + 1 ], ai, bi, ci + 1 ) );
			us[ ai ][ bi ][ ci + 1 ] = true;
		}
	}
	return anss.to!( string[] ).join( "\n" );
}
