#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
using namespace std;

#define make_pair mp
#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v.begin(), v.end())
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T> ostream& operator << (ostream &s, set<T> P)
{ EACH(it, P) { s << "<" << *it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }

struct pa {
    long long val;
    long long x, y, z;
    pa(long long v, long long x, long long y, long long z) : val(v), x(x), y(y), z(z) { }
};

bool operator < (pa a, pa b) {
    vector<long long> va(4), vb(4);
    va[0] = a.val, va[1] = a.x, va[2] = a.y, va[3] = a.z;
    vb[0] = b.val, vb[1] = b.x, vb[2] = b.y, vb[3] = b.z;
    return va < vb;
}

long long A[3], K;
int main() {
    while (cin >> A[0] >> A[1] >> A[2] >> K) {
        vector<vector<long long> > v(3, vector<long long>());
        for (int iter = 0; iter < 3; ++iter) {
            v[iter].resize(A[iter]);
            for (int i = 0; i < A[iter]; ++i) cin >> v[iter][i];
            sort(v[iter].begin(), v[iter].end());
        }
        
        priority_queue<pa> que;
        set<pa> se;
        que.push(pa(v[0].back() + v[1].back() + v[2].back(), A[0]-1, A[1]-1, A[2]-1));
        for (int k = 0; k < K; ++k) {
            auto c = que.top();
            //cout << c.val << ", " << c.x << ", " << c.y << ", " << c.z << endl;
            que.pop();
            cout << c.val << endl;
            if (c.x > 0) {
                auto p = pa(v[0][c.x-1] + v[1][c.y] + v[2][c.z], c.x-1, c.y, c.z);
                if (!se.count(p)) se.insert(p), que.push(p);
            }
            if (c.y > 0) {
                auto p = pa(v[0][c.x] + v[1][c.y-1] + v[2][c.z], c.x, c.y-1, c.z);
                if (!se.count(p)) se.insert(p), que.push(p);
            }
            if (c.z > 0) {
                auto p = pa(v[0][c.x] + v[1][c.y] + v[2][c.z-1], c.x, c.y, c.z-1);
                if (!se.count(p)) se.insert(p), que.push(p);
            }
        }
    }
}













Measured memory_bytes: 1024