#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;
    }
}

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;

    solve3();
}


Measured memory_bytes: 1024