///////////////////////////////////////////////////////////////////////////////

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <typeinfo>

using namespace std;

///////////////////////////////////////////////////////////////////////////////

#define pb push_back

struct T2 {
        long t0;
        long t1;
};

struct T3 {
        long t0;
        long t1;
        long t2;
};

struct T4 {
        long t0;
        long t1;
        long t2;
        long t3;
};

bool operator<(const T2 &lhs, const T2 &rhs)
{
        if (lhs.t0 != rhs.t0) return lhs.t0 < rhs.t0;
        return lhs.t1 < rhs.t1;
}

bool operator>(const T2 &lhs, const T2 &rhs)
{
        if (lhs.t0 != rhs.t0) return lhs.t0 > rhs.t0;
        return lhs.t1 > rhs.t1;
}

bool operator==(const T2 &lhs, const T2 &rhs)
{
        if (lhs.t0 != rhs.t0) return false;
        return lhs.t1 == rhs.t1;
}

bool operator!=(const T2 &lhs, const T2 &rhs)
{
        return !(lhs == rhs);
}

bool operator<(const T3 &lhs, const T3 &rhs)
{
        if (lhs.t0 != rhs.t0) return lhs.t0 < rhs.t0;
        if (lhs.t1 != rhs.t1) return lhs.t1 < rhs.t1;
        return lhs.t2 < rhs.t2;
}

bool operator>(const T3 &lhs, const T3 &rhs)
{
        if (lhs.t0 != rhs.t0) return lhs.t0 > rhs.t0;
        if (lhs.t1 != rhs.t1) return lhs.t1 > rhs.t1;
        return lhs.t2 > rhs.t2;
}

bool operator==(const T3 &lhs, const T3 &rhs)
{
        if (lhs.t0 != rhs.t0) return false;
        if (lhs.t1 != rhs.t1) return false;
        return lhs.t2 == rhs.t2;
}

bool operator!=(const T3 &lhs, const T3 &rhs)
{
        return !(lhs == rhs);
}

bool operator<(const T4 &lhs, const T4 &rhs)
{
        if (lhs.t0 != rhs.t0) return lhs.t0 < rhs.t0;
        if (lhs.t1 != rhs.t1) return lhs.t1 < rhs.t1;
        if (lhs.t2 != rhs.t2) return lhs.t2 < rhs.t2;
        return lhs.t3 < rhs.t3;
}

bool operator>(const T4 &lhs, const T4 &rhs)
{
        if (lhs.t0 != rhs.t0) return lhs.t0 > rhs.t0;
        if (lhs.t1 != rhs.t1) return lhs.t1 > rhs.t1;
        if (lhs.t2 != rhs.t2) return lhs.t2 > rhs.t2;
        return lhs.t3 > rhs.t3;
}

bool operator==(const T4 &lhs, const T4 &rhs)
{
        if (lhs.t0 != rhs.t0) return false;
        if (lhs.t1 != rhs.t1) return false;
        if (lhs.t2 != rhs.t2) return false;
        return lhs.t3 == rhs.t3;
}

bool operator!=(const T4 &lhs, const T4 &rhs)
{
        return !(lhs == rhs);
}

void longin(long &a)
{
        cin >> a;
}

void longinl1(auto &v, long count)
{
        for (long i = 0; i < count ; ++i) {
                long a;
                cin >> a;
                v.push_back(a);
        }
}

void longinl2(auto &v, long count)
{
        for (long i = 0; i < count ; ++i) {
                long a, b;
                cin >> a >> b;
                v.push_back({a, b});
        }
}

void longinl3(auto &v, long count)
{
        for (long i = 0; i < count ; ++i) {
                long a, b, c;
                cin >> a >> b >> c;
                v.push_back({a, b, c});
        }
}

void longina(auto &v, long count)
{
        longinl1(v, count);
}

long min(const vector<long> v)
{
        long ret = (long)numeric_limits<double>::infinity();
        for (auto i : v) ret = min(ret, i);
        return ret;
}

void sortl(vector<long> &v)
{
        sort(v.begin(), v.end());
}

void sortl_reverse(vector<long> &v)
{
        sort(v.begin(), v.end(), greater<long>());
}

///////////////////////////////////////////////////////////////////////////////

int main()
{
        long x, y, z, k;
        longin(x); longin(y); longin(z); longin(k);

        vector<long> alist, blist, clist;
        longina(alist, x); longina(blist, y); longina(clist, z);

        sortl_reverse(alist);
        sortl_reverse(blist);
        sortl_reverse(clist);

        priority_queue<T4> q;
        map<T4, bool> m;
        T4 initial = {alist[0] + blist[0] + clist[0], 0, 0, 0};
        q.push(initial);
        m[initial] = true;

        for (int i = 0; i < k; ++i) {
                T4 now = q.top();
                q.pop();
                long ans = now.t0;
                long a = now.t1;
                long b = now.t2;
                long c = now.t3;

                cout << ans << endl;

                if (a < x - 1) {
                        T4 next = {alist[a+1] + blist[b] + clist[c], a+1, b, c};
                        if (m.count(next) == 0) {
                                q.push(next);
                                m[next] = true;
                        }
                }

                if (b < y - 1) {
                        T4 next = {alist[a] + blist[b+1] + clist[c], a, b+1, c};
                        if (m.count(next) == 0) {
                                q.push(next);
                                m[next] = true;
                        }
                }

                if (c < z - 1) {
                        T4 next = {alist[a] + blist[b] + clist[c+1], a, b, c+1};
                        if (m.count(next) == 0) {
                                q.push(next);
                                m[next] = true;
                        }
                }
        }

        return 0;
}

///////////////////////////////////////////////////////////////////////////////


Measured memory_bytes: 1152