#include <bits/stdc++.h>

using namespace std;

long a[3][1111], d[111111];
int main() {
	int x[3], k, c = 0;
	cin >> x[0] >> x[1] >> x[2] >> k;
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < x[i]; j++)
			scanf("%ld", a[i] + j);
		sort(a[i], a[i] + x[i], greater<long>());
	}
	for (int i = 1; i <= x[0]; i++) {
		if (i > k) break;
		for (int j = 1; j <= x[1]; j++) {
			if (i*j > k) break;
			long b = a[0][i - 1] + a[1][j - 1];
			for (int l = 1; l <= x[2]; l++) {
				if (i*j > k / l) break;
				d[c++] = b + a[2][l - 1];
			}
		}
	}
	nth_element(d, d + k, d + c, greater<long>());
	sort(d, d + k, greater<long>());
	for (int i = 0; i < k; i++)
		cout << d[i] << '\n';
	cout << flush;
	return 0;
}
