#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define ll long long
int main(){
  int X,Y,Z,K;
  cin>>X>>Y>>Z>>K;
  vector<ll> A(1001),B(1001),C(1001);
  rep(i,X) cin>>A[i];
  rep(i,Y) cin>>B[i];
  rep(i,Z) cin>>C[i];
  vector<ll> D(X*Y),E(Z*K);
  rep(i,X) rep(j,Y) D.push_back(A[i]+B[j]);
  sort(all(C));
  reverse(all(C));
  sort(all(D));
  reverse(all(D));
  rep(i,Z) rep(j,K) E.push_back(C[i]+D[j]);
  sort(all(E));
  reverse(all(E));
  rep(i,K) cout<<E[i]<<endl;
}