#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

const int MOD=1000000007;
const int INF=0x3f3f3f3f;
const ll INFL=0x3f3f3f3f3f3f3f3f;
 
int main() {
  int x,y,z,k ; cin>>x>>y>>z>>k;
  vector<ll>A(x);
  vector<ll>B(y);
  vector<ll>C(z);
  
  rep(i,x){cin>>A[i];};
  rep(i,y){cin>>B[i];};
  rep(i,z){cin>>C[i];};
  
  vector<ll> AB;
  rep(i,x){
    rep(j,y){
      AB.push_back(A[i]+B[j]);
    }
  }
  sort(AB.begin(),AB.end(),greater<ll>());
  AB.resize(k);
  
  vector<ll>ABC;
  rep(i,k){
    rep(j,z){
      ABC.push_back(AB[i]+C[j]);
    }
  }
  sort(ABC.begin(),ABC.end(),greater<ll>());
  rep(i,k){
    cout<<ABC[i]<<endl;
  }
}
