// D - Cake 123
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rp(i,n) for(int i=0;i<(n);++i)

int main(){
	int X,Y,Z,K; cin>>X>>Y>>Z>>K;

	vector<ll> A(X), B(Y), C(Z);
	rp(i,X) cin>>A[i];
	rp(i,Y) cin>>B[i];
	rp(i,Z) cin>>C[i];

	vector<ll> AB;
	for(ll a:A) for(ll b:B) AB.push_back(a + b);
	sort(AB.rbegin(), AB.rend());

	vector<ll> ABC;
	int e = min(K, (int)AB.size());
	for(ll c:C) rp(d,e) ABC.push_back(c + AB[d]);

	sort(ABC.rbegin(), ABC.rend());
	rp(i,K) cout<<ABC[i]<<"\n";
}