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

#define pb push_back
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define REP(i,n) for(int _n=n, i=0;i<_n;++i)
#define FOR(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define FORD(i,a,b) for(int i=(a),_b=(b);i>=_b;--i)
#define trav(a, x) for (auto& a : x)
using ull = uint64_t;
using ll = int64_t;
using PII = pair<int, int>;
using VI = vector<int>;
#define INF (1ll<<60)

string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string) s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B> string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; }
template <typename A> string to_string(A v) {
bool first = true; string res = "{";
for (const auto &x : v) { if (!first) { res += ", "; } first = false; res += to_string(x); }
res += "}"; return res; }
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H); debug_out(T...); }
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)

int main() {
    ios::sync_with_stdio(false), cin.tie(0);
    int X, Y, Z, K;
    cin >> X >> Y >> Z >> K;
    vector<ll> x(X), y(Y), z(Z);
    REP(i, X) cin >> x[i];
    REP(i, Y) cin >> y[i];
    REP(i, Z) cin >> z[i];
    sort(all(x), greater<ll>());
    sort(all(y), greater<ll>());
    sort(all(z), greater<ll>());
    auto comp = [&]( pair<int, PII> a, pair<int, PII> b ) { 
        return x[a.first] + y[a.second.first] + z[a.second.second] <
        x[b.first] + y[b.second.first] + z[b.second.second];
    };
    priority_queue<pair<int, PII>, vector<pair<int, PII>>, decltype( comp )> P(comp);
    P.push({0, {0, 0}});
    set<pair<int, PII>> S, Processed;
    S.insert({0, {0, 0}});
    while (K--) {
        auto p = P.top();
        cout << x[p.first] + y[p.second.first] + z[p.second.second] << '\n';
        Processed.insert(p);
        S.erase(S.find(p));
        P.pop();
        if (p.first < X - 1) {
            pair<int, PII> pp{p.first + 1, {p.second.first, p.second.second}};
            if (S.find(pp) == S.end() && Processed.find(pp) == Processed.end()) {
                P.push(pp);
                S.insert(pp);
            }
        }
        if (p.second.first < Y - 1) {
            pair<int, PII> pp = {p.first, {p.second.first + 1, p.second.second}};
            if (S.find(pp) == S.end() && Processed.find(pp) == Processed.end()) {
                P.push(pp);
                S.insert(pp);
            }
        }
        if (p.second.second < Z - 1) {
            pair<int, PII> pp = {p.first, {p.second.first, p.second.second + 1}};
            if (S.find(pp) == S.end() && Processed.find(pp) == Processed.end()) {
                P.push(pp);
                S.insert(pp);
            }
        }
    }
    // vector<ll> A;
    // REP(i, X) {
    //     REP(j, Y) {
    //         A.pb(x[i] + y[j]);
    //     }
    // }
    // sort(all(A), greater<ll>());
    // VI foo(Z, 0);
    // while (K--) {
    //     ll mx = 0;
    //     int idx = 0;
    //     REP(i, Z) {
    //         if (foo[i] >= SZ(A)) continue;
    //         ll a = z[i] + A[foo[i]];
    //         if (a > mx) {
    //             mx = a;
    //             idx = i;
    //         }
    //     }
    //     foo[idx]++;
    //     cout << mx << '\n';
    // }
}

Measured memory_bytes: 768