#include <bits/stdc++.h>
using namespace std;

using ll = long long;

int X, Y, Z, K;
vector<ll> A, B, C;

void solve1() {
    vector<ll> E(X*Y);
    int e = 0;
    for (int i = 0; i < X; i++) {
        for (int j = 0; j < Y; j++) {
            E[e++] = A[i] + B[j];
        }
    }
    sort(E.begin(), E.end(), greater<ll>());
    int lim = min((int)E.size(), K);
    vector<ll> ans(lim*Z);
    int ec = 0;
    for (int i = 0; i < lim; i++) {
        for (int j = 0; j < Z; j++) {
            ans[ec++] = E[i] + C[j];
        }
    }
    sort(ans.begin(), ans.end(), greater<ll>());
    for (int i = 0; i < K; i++) {
        cout << ans[i] << endl;
    }
}

void solve1a() {
    if (X > K) {
        sort(A.begin(), A.end(), greater<ll>());
    }
    if (Y > K) {
        sort(B.begin(), B.end(), greater<ll>());
    }
    int lim_a = min(K, X);
    int lim_b = min(K, Y);
    vector<ll> E(lim_a * lim_b);
    int e = 0;
    for (int i = 0; i < lim_a; i++) {
        for (int j = 0; j < lim_b; j++) {
            E[e++] = A[i] + B[j];
        }
    }
    sort(E.begin(), E.end(), greater<ll>());
    int lim_e = min((int)E.size(), K);
    vector<ll> ans(lim_e*Z);
    int ec = 0;
    for (int i = 0; i < lim_e; i++) {
        for (int j = 0; j < Z; j++) {
            ans[ec++] = E[i] + C[j];
        }
    }
    sort(ans.begin(), ans.end(), greater<ll>());
    for (int i = 0; i < K; i++) {
        cout << ans[i] << endl;
    }

}

void solve2() {
    sort(A.begin(), A.end(), greater<ll>());
    sort(B.begin(), B.end(), greater<ll>());
    sort(C.begin(), C.end(), greater<ll>());

    vector<ll> E;
    for (int i = 0; i < X; i++) {
        int j_lim = min(Y, K / (i+1));
        for (int j = 0; j < j_lim; j++) {
            int k_lim = min(Z, K / ((i+1) * (j+1)));
            for (int k = 0; k < k_lim; k++) {
                E.push_back(A[i] + B[j] + C[k]);
            }
        }
    }

    sort(E.begin(), E.end(), greater<ll>());
    for (int i = 0; i < K; i++) {
        cout << E[i] << endl;
    }
}

void solve2a() {
    sort(A.begin(), A.end(), greater<ll>());
    sort(B.begin(), B.end(), greater<ll>());
    sort(C.begin(), C.end(), greater<ll>());

    vector<ll> ans;
    for (int i = 0; i < X; i++) {
        for (int j = 0; j < Y; j++) {
            for (int k = 0; k < Z; k++) {
                if ((i+1) * (j+1) * (k+1) <= K) {
                    ans.push_back(A[i] + B[j] + C[k]);
                } else {
                    break;
                }
            }
        }
    }

    sort(ans.begin(), ans.end(), greater<ll>());
    for (int i = 0; i < K; i++) {
        cout << ans[i] << endl;
    }
}

using tiii = tuple<int, int, int>;

void solve3() {
    sort(A.begin(), A.end(), greater<ll>());
    sort(B.begin(), B.end(), greater<ll>());
    sort(C.begin(), C.end(), greater<ll>());

    vector<ll> ans;
    set<tiii> s;
    priority_queue< pair<ll, tiii> > q;
    q.push(make_pair(A[0]+B[0]+C[0], make_tuple(0,0,0)));
    s.insert(make_tuple(0, 0, 0));
    for (int i = 0; i < K; i++) {
        pair<ll, tiii> p = q.top(); q.pop();
        ans.push_back(p.first);

        {
            tiii t(p.second);
            get<0>(t) += 1;
            if (get<0>(t) < X && s.count(t) == 0) {
                q.push(make_pair(A[get<0>(t)]+B[get<1>(t)]+C[get<2>(t)], t));
                s.insert(t);
            }
        }
        {
            tiii t(p.second);
            get<1>(t) += 1;
            if (get<1>(t) < Y && s.count(t) == 0) {
                q.push(make_pair(A[get<0>(t)]+B[get<1>(t)]+C[get<2>(t)], t));
                s.insert(t);
            }
        }
        {
            tiii t(p.second);
            get<2>(t) += 1;
            if (get<2>(t) < Z && s.count(t) == 0) {
                q.push(make_pair(A[get<0>(t)]+B[get<1>(t)]+C[get<2>(t)], t));
                s.insert(t);
            }
        }
    
    }
    for (int i = 0; i < K; i++) {
        cout << ans[i] << endl;
    }
}

void solve3a() {
    sort(A.begin(), A.end(), greater<ll>());
    sort(B.begin(), B.end(), greater<ll>());
    sort(C.begin(), C.end(), greater<ll>());

    vector<ll> ans;
    set<vector<int>> s;
    priority_queue< pair<ll, vector<int> > > q;
    q.push(make_pair(A[0]+B[0]+C[0], vector<int>{0,0,0}));
    s.insert(vector<int>{0,0,0});
    for (int i = 0; i < K; i++) {
        pair<ll, vector<int>> p = q.top(); q.pop();
        ans.push_back(p.first);
        vector<int> xyz = { X, Y, Z };
        for (int j = 0; j < 3; j++) {
            vector<int> iii = p.second;
            iii[j] += 1;
            if (iii[j] < xyz[j] && s.count(iii) == 0) {
                q.push(make_pair(A[iii[0]]+B[iii[1]]+C[iii[2]], iii));
                s.insert(iii);
            }  
        }
    }
    for (int i = 0; i < K; i++) {
        cout << ans[i] << endl;
    }
}

void solve4() {
    sort(A.begin(), A.end(), greater<ll>());
    sort(B.begin(), B.end(), greater<ll>());
    sort(C.begin(), C.end(), greater<ll>());

    ll l_ok = 1, r_ng = 10000000000 * 3 + 1;
    while (r_ng - l_ok > 1) {
        ll m = (l_ok + r_ng) / 2;
        
        ll cnt = 0;
        for (int i = 0; i < X; i++) {
            for (int j = 0; j < Y; j++) {
                ll ab = A[i] + B[j];
                ll d = max(0LL, m - ab);
                auto it = lower_bound(C.rbegin(), C.rend(), d);
                int nz = distance(it, C.rend());
                cnt += nz;
                if (nz == 0) {
                    break;
                }
            }
        }

        if (cnt >= K) l_ok = m;
        else r_ng = m;
    }

    vector<ll> ans;
    for (int i = 0; i < X; i++) {
        for (int j = 0; j < Y; j++) {
            ll ab = A[i] + B[j];
            ll d = max(0LL, l_ok + 1 - ab);
            auto it = lower_bound(C.rbegin(), C.rend(), d);
            int nz = distance(it, C.rend());
            for (int k = 0; k < nz; k++) {
                ans.push_back(ab + C[k]);
            }
            if (nz == 0) {
                break;
            }
        }
    }
    sort(ans.begin(), ans.end(), greater<ll>());
    for (int i = 0; i < ans.size(); i++) {
        cout << ans[i] << endl;
    }
    if (ans.size() < K) {
        for (int i = 0; i < K - ans.size(); i++) {
            cout << l_ok << endl;
        }
    }
}

int main() {
    cin.tie(nullptr); ios::sync_with_stdio(false);
    
    cin >> X >> Y >> Z >> K;
    A.resize(X); for (auto& a : A) cin >> a;
    B.resize(Y); for (auto& b : B) cin >> b;
    C.resize(Z); for (auto& c : C) cin >> c;

    solve4();
}


Measured memory_bytes: 384