#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <cmath>

using namespace std;
#define PI 3.1415926535897932384626433832795
#define MOD (1000000007)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repc(i, s, n) for (int i = (s); i <= (n); i++)
#define rrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define rrepc(i, s, n) for (int i = (s); i >= (n); i--)
typedef long long ll;
typedef unsigned long long ull;

#define p(a, b) make_pair(a, b)
struct xyz { int x, y, z; };
typedef pair<ll, xyz> SET;
vector<pair<ll, pair<int, int> > > vecBC;
vector<pair<ll, pair<int, int> > > vecCA;
vector<pair<ll, pair<int, int> > > vecAB;

ll A[1000];
ll B[1000];
ll C[1000];

bool operator< (const xyz& o1, const xyz& o2) {
	return o1.x < o2.y;
}

int main()
{
	int X, Y, Z, K, cnt = 0;
	int cx = 0, cy = 0, cz = 0;
	priority_queue<SET> pq;
	xyz index;

	cin >> X >> Y >> Z >> K;
	rep(i, X) cin >> A[i];
	rep(i, Y) cin >> B[i];
	rep(i, Z) cin >> C[i];

	sort(A, A + X, greater<ll>());
	sort(B, B + Y, greater<ll>());
	sort(C, C + Z, greater<ll>());

	index.x = 0;
	index.y = 0;
	index.z = 0;
	pq.push(p(A[0] + B[0] + C[0], index));

	vecAB.push_back(p(A[0] + B[0], p(0, 0)));
	vecBC.push_back(p(B[0] + C[0], p(0, 0)));
	vecCA.push_back(p(C[0] + A[0], p(0, 0)));

	rep(loop, K) {
		SET head = pq.top(); pq.pop();
		int new_x = head.second.x + 1;
		int new_y = head.second.y + 1;
		int new_z = head.second.z + 1;
		xyz new_index;

		if (cx < new_x && new_x < X) {
			int size = vecBC.size();

			cx = new_x;
			new_index.x = cx;

			rep(i, size) {
				ll sum = vecBC[i].first + A[cx];
				new_index.y = vecBC[i].second.first;
				new_index.z = vecBC[i].second.second;
				pq.push(p(sum, new_index));
			}
			rep(i_y, cy + 1) {
				pair<int, int> xy = p(cx, i_y);
				ll sum = A[cx] + B[i_y];
				vecAB.push_back(p(sum, xy));
			}
			rep(i_z, cz + 1) {
				pair<int, int> zx = p(i_z, cx);
				ll sum = C[i_z] + A[cx];
				vecCA.push_back(p(sum, zx));
			}
		}

		if (cy < new_y && new_y < Y) {
			int size = vecCA.size();

			cy = new_y;
			new_index.y = cy;

			rep(i, size) {
				ll sum = vecCA[i].first + B[cy];
				new_index.z = vecCA[i].second.first;
				new_index.x = vecCA[i].second.second;
				pq.push(p(sum, new_index));
			}
			rep(i_z, cz + 1) {
				pair<int, int> yz = p(cy, i_z);
				ll sum = B[cy] + C[i_z];
				vecBC.push_back(p(sum, yz));
			}
			rep(i_x, cx + 1) {
				pair<int, int> xy = p(i_x, cy);
				ll sum = A[i_x] + B[cy];
				vecAB.push_back(p(sum, xy));
			}
		}
		if (cz < new_z && new_z < Z) {
			int size = vecAB.size();

			cz = new_z;
			new_index.z = cz;

			rep(i, size) {
				ll sum = vecAB[i].first + C[cz];
				new_index.x = vecAB[i].second.first;
				new_index.y = vecAB[i].second.second;
				pq.push(p(sum, new_index));
			}
			rep(i_x, cx + 1) {
				pair<int, int> zx = p(cz, i_x);
				ll sum = C[cz] + A[i_x];
				vecCA.push_back(p(sum, zx));
			}
			rep(i_y, cy + 1) {
				pair<int, int> yz = p(i_y, cz);
				ll sum = B[i_y] + C[cz];
				vecBC.push_back(p(sum, yz));
			}
		}

		cout << head.first << endl;
	}

	return 0;
}

Measured memory_bytes: 400496