#include <vector>
#include <iostream>
#include <cmath>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <fstream>
#include <unistd.h>
#include <string>
#include <numeric>
#include <queue>
#include <deque>
#include <sstream>
#include <iomanip>
#include <set>
#include <stack>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<bool> vb;
typedef vector<vector<bool>> vvb;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef vector<char> vc;
typedef vector<vector<char>> vvc;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
typedef vector<P> vp;
typedef vector<PL> vpl;
typedef vector<vector<P>> vvp;
typedef vector<vector<PL>> vvpl;
const int INF = 1001001001;
const ll LINF = 1e18;
const double pi = 3.1415926535897932;
const string endstr = "\n";
#define FOR(i, a, b) for(ll i = (a); i < b; i++)
#define REP(i, n) for(ll i = 0; i < n; i++)
#define FORMAP(it, m) for(auto it = m.begin(); it != m.end(); it++)
#define ff first
#define ss second
#define pb push_back

template <typename T>
T gcd(T a, T b) {
    return (a == 0) ? b : gcd(b%a, a);
}
template <typename T>
T lcm(T a, T b) {
    return a / gcd(a, b) * b;
}

bool p_comp_fs(const PL p1, const PL p2){ return p1.first < p2.first;};
bool p_comp_fg(const PL p1, const PL p2){ return p1.first > p2.first;};
bool p_comp_ss(const PL p1, const PL p2){ return p1.second < p2.second;};
bool p_comp_sg(const PL p1, const PL p2){ return p1.second > p2.second;};
template <typename T>
vector<T> uniquen(vector<T> vec){
    vec.erase(unique(vec.begin(), vec.end()), vec.end());
    return vec;
}

struct tup{
public:
    ll a;
    ll b;
    ll c;
    tup(ll a_, ll b_, ll c_){
        a = a_; b = b_; c = c_;
    }
    bool operator==(tup other)
    {
        return this->a == other.a && this->b == other.b && this->c == other.c;
    };
};

int main(){
    ll x, y, z, k; cin >> x >> y >> z >> k;
    vl as(x), bs(y), cs(z); vpl all(x+y+z);
    REP(i, x){
        ll a; cin >> a; as[i] = a; all.pb(PL(1,a));
    }
    REP(i, y){
        ll b; cin >> b; bs[i] = b; all.pb(PL(2,b));
    }
    REP(i, z){
        ll c; cin >> c; cs[i] = c; all.pb(PL(3,c));
    }
    sort(as.begin(), as.end(), greater<ll>());
    sort(bs.begin(), bs.end(), greater<ll>());
    sort(cs.begin(), cs.end(), greater<ll>());
    
    vl ans;
    multimap<ll, tup, greater<ll>> rem;
    stack<tup> st; st.push(tup(0,0,0)); ans.pb(as[0]+bs[0]+cs[0]);
    vector<tup> used; used.pb(tup(0,0,0));
    while(ans.size() < k){
        tup cur = st.top(); st.pop();
        
        ll a = cur.a, b = cur.b, c = cur.c;
        if(used.size() !=0 )
        {
            if(a < x - 1 && std::find(used.begin(), used.end(), tup(a+1,b,c)) == used.end()){
                rem.emplace(as[a+1]+bs[b]+cs[c], tup(a+1,b,c)); used.pb(tup(a+1,b,c));
            }
            if(b < y - 1 && std::find(used.begin(), used.end(), tup(a,b+1,c)) == used.end()){
                rem.emplace(as[a]+bs[b+1]+cs[c], tup(a,b+1,c)); used.pb(tup(a,b+1,c));
            }
            if(c < z - 1 && std::find(used.begin(), used.end(), tup(a,b,c+1)) == used.end()){
                rem.emplace(as[a]+bs[b]+cs[c+1], tup(a,b,c+1)); used.pb(tup(a,b,c+1));
            }
        }
        ans.pb(rem.begin()->ff);
        st.push(rem.begin()->ss);
        rem.erase(rem.begin());
    }
    REP(i, k) cout << ans[i] << endstr;
    return 0;
}


Measured memory_bytes: 896