#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pp;
const int INF = 1e9;
const int MOD = 1000000007;
#define rep(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);
  rep(i,x) cin >> a.at(i);
  rep(i,y) cin >> b.at(i);
  rep(i,z) cin >> c.at(i);
  vector<ll> ab;
  rep(i,x)rep(j,y) ab.push_back(a.at(i)+b.at(j));
  sort(ab.begin(),ab.end(),greater<ll>());
  vector<ll> abc;
  rep(i,min(k,x*y))rep(j,z) abc.push_back(ab.at(i)+c.at(j));
  sort(abc.begin(),abc.end(),greater<ll>());
  rep(i,k) cout << abc.at(i) << endl;
  
  return 0;
}

