// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



using i32 = std::int_fast32_t;

using i64 = std::int_fast64_t;



#define REP(i, stop) FOR(i, 0, stop)

#define FOR(i, start, stop) for (int i = start, i##_len = stop; i < i##_len; ++i)

#define RREP(i, n) for (int i = n; i-- > 0;)

#define ALL(v) (v).begin(), (v).end()



template<typename T> istream& operator>>(istream& is, vector<T>& a) { for (T& x : a) is >> x; return is; }



// struct InitCpp { InitCpp() { cin.tie(nullptr); ios::sync_with_stdio(false); } } initCpp;



signed main() {

  i32 x, y, z, k;

  cin >> x >> y >> z >> k;

  vector<i64> A(x), B(y), C(z);

  cin >> A >> B >> C;

  sort(ALL(A), greater<i64>());

  sort(ALL(B), greater<i64>());

  sort(ALL(C), greater<i64>());

  using T = tuple<i32, i32, i32>;

  using P = pair<i64, T>;

  priority_queue<P> Q;

  Q.push({A[0] + B[0] + C[0], make_tuple(0, 0, 0)});

  set<T> S;

  S.insert(make_tuple(0, 0, 0));

  REP(_, k) {

    i64 p = Q.top().first;

    i32 u, v, w;

    tie(u, v, w) = Q.top().second;

    Q.pop();

    cout << p << endl;

    auto u1 = make_tuple(u + 1, v, w);

    auto v1 = make_tuple(u, v + 1, w);

    auto w1 = make_tuple(u, v, w + 1);

    if (u + 1 < x && !S.count(u1)) { S.insert(u1); Q.push({A[u + 1] + B[v] + C[w], u1}); }

    if (v + 1 < y && !S.count(v1)) { S.insert(v1); Q.push({A[u] + B[v + 1] + C[w], v1}); }

    if (w + 1 < z && !S.count(w1)) { S.insert(w1); Q.push({A[u] + B[v] + C[w + 1], w1}); }

  }

}

// Faster C++ solution for the same problem (measured speedup: 1.1086959716472906x):
// #include <bits/stdc++.h>

#include <cstdio>

#include <vector>

#include <functional>

#include <algorithm>

#include <queue>

#include <set>

using namespace std;



using i32 = int;

using i64 = long long;



#define REP(i, stop) FOR(i, 0, stop)

#define FOR(i, start, stop) for (int i = start, i##_len = stop; i < i##_len; ++i)

#define RREP(i, n) for (int i = n; i-- > 0;)

#define ALL(v) (v).begin(), (v).end()



template<typename T>

T read() {

  T a = 0;

  for(;;) {

    char c = getchar();

    if ('0' <= c && c <= '9') {

      a = a * 10 + c - 48;

    } else {

      return a;

    }

  }

}



signed main() {

//  i32 x, y, z, k;

//  scanf("%d%d%d%d", &x, &y, &z, &k);

  i32 x = read<i32>(),

      y = read<i32>(),

      z = read<i32>(),

      k = read<i32>();

  vector<i64> A(x), B(y), C(z);

//  REP(i, x) scanf("%lld", &A[i]);

//  REP(i, y) scanf("%lld", &B[i]);

//  REP(i, z) scanf("%lld", &C[i]);

  REP(i, x) A[i] = read<i64>();

  REP(i, y) B[i] = read<i64>();

  REP(i, z) C[i] = read<i64>();

  sort(ALL(A), greater<i64>());

  sort(ALL(B), greater<i64>());

  sort(ALL(C), greater<i64>());

  using P = pair<i64, i64>;

  priority_queue<P> Q;

  Q.push({A[0] + B[0] + C[0], 0});

  set<i64> S;

  S.insert(0);

  REP(_, k) {

    i64 p = Q.top().first;

    i64 q = Q.top().second;

    Q.pop();

    printf("%lld\n", p);

    i32 u = q & 1023;

    i32 v = q >> 10 & 1023;

    i32 w = q >> 20 & 1023;

    i64 u1 = q + 1;

    i64 v1 = q + (1 << 10);

    i64 w1 = q + (1 << 20);

    if (u + 1 < x && !S.count(u1)) { S.insert(u1); Q.push({A[u + 1] + B[v] + C[w], u1}); }

    if (v + 1 < y && !S.count(v1)) { S.insert(v1); Q.push({A[u] + B[v + 1] + C[w], v1}); }

    if (w + 1 < z && !S.count(w1)) { S.insert(w1); Q.push({A[u] + B[v] + C[w + 1], w1}); }

  }

}