#include <bits/stdc++.h>

using namespace std;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define FORR(i, a, b) for(int i = (a); i > (b); --i)
#define REP(i, n) for(int i = 0; i < (n); ++i)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOREACH(x, a) for(auto &(x) : (a))
#define VECCIN(x)                                                              \
    for(auto &youso_ : (x)) cin >> youso_
#define mp make_pair
#define bitcnt __builtin_popcount
#define All(a) (a).begin(), (a).end()
template <typename T = long long> inline T IN() {
    T x;
    cin >> x;
    return (x);
}
inline void CIN() {}
template <class Head, class... Tail>
inline void CIN(Head &&head, Tail &&... tail) {
    cin >> head;
    CIN(move(tail)...);
}
#define CINT(...)                                                              \
    int __VA_ARGS__;                                                           \
    CIN(__VA_ARGS__)
#define LCIN(...)                                                              \
    ll __VA_ARGS__;                                                            \
    CIN(__VA_ARGS__)
#define SCIN(...)                                                              \
    string __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define Yes(a) cout << (a ? "Yes" : "No") << "\n"
#define YES(a) cout << (a ? "YES" : "NO") << "\n"

typedef long long ll;
typedef vector<int> V;
typedef vector<ll> VL;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
typedef priority_queue<int> PQ;
typedef priority_queue<int, V, greater<int>> PQG;

const int INF = 1e9;
const int MOD = 998244353;
const ll LINF = 1e18;

ll X, Y, Z, K;
VL A, B, C;

struct cake {
    ll sum;
    ll idxA;
    ll idxB;
    ll idxC;

    bool operator<(const cake &another) const {
        if(sum != another.sum)
            return sum < another.sum;
        else if(idxA != another.idxA)
            return idxA < another.idxA;
        else if(idxB != another.idxB)
            return idxB < another.idxB;
        else
            return idxC < another.idxC;
    }
};

int main() {
    cin >> X >> Y >> Z >> K;
    A.resize(X);
    B.resize(Y);
    C.resize(Z);
    VECCIN(A);
    VECCIN(B);
    VECCIN(C);
    sort(All(A), greater<ll>());
    sort(All(B), greater<ll>());
    sort(All(C), greater<ll>());
    priority_queue<cake> pq;
    map<cake, ll> eaten;

    pq.push({A[0] + B[0] + C[0], 0, 0, 0});
    eaten[{A[0] + B[0] + C[0], 0, 0, 0}]++;
    ll cnt = 0;
    while(cnt < K) {
        cout << pq.top().sum << "\n";
        ll nowa = pq.top().idxA;
        ll nowb = pq.top().idxB;
        ll nowc = pq.top().idxC;
        pq.pop();
        cake nexta = {A[nowa + 1] + B[nowb] + C[nowc], nowa + 1, nowb, nowc};
        cake nextb = {A[nowa] + B[nowb + 1] + C[nowc], nowa, nowb + 1, nowc};
        cake nextc = {A[nowa] + B[nowb] + C[nowc + 1], nowa, nowb, nowc + 1};
        if(nowa + 1 < X && eaten[nexta] == 0) {
            pq.push(nexta);
            eaten[nexta]++;
        }
        if(nowb + 1 < Y && eaten[nextb] == 0) {
            pq.push(nextb);
            eaten[nextb]++;
        }
        if(nowc + 1 < Z && eaten[nextc] == 0) {
            pq.push(nextc);
            eaten[nextc]++;
        }
        cnt++;
    }
    return 0;
}


Measured memory_bytes: 1152