// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



using i32 = std::int_fast32_t;

using i64 = std::int_fast64_t;

template <typename T> constexpr T inf = numeric_limits<T>::has_infinity ? numeric_limits<T>::infinity() : numeric_limits<T>::max() / 4;



#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, typename U> istream& operator>>(istream& is, pair<T, U>& a) { return is >> a.first >> a.second; }

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



void LOG(const int& x) { cerr << x << "\n"; }

void LOG(const vector<int>& a) { for (int x : a) cerr << x << " "; cerr << "\n"; }

template<typename T, std::size_t S> void LOG(const T (&a)[S]) { REP(i, S) cerr << a[i] << " "; cerr << "\n"; }

template<typename T, std::size_t S, std::size_t R> void LOG(const T (&a)[S][R]) { REP(i, S) { REP(j, R) cerr << a[i][j] << " "; cerr << "\n"; } }



int ceil(int a, int b) { return (a - 1) / b + 1; }

i64 gcd(i64 a, i64 b) { while (b != 0) { i64 t = b; b = a % b; a = t; } return a; }

i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }

i64 gcd(const vector<i64>& v) { return accumulate(ALL(v), 1LL, static_cast<i64(*)(i64, i64)>(gcd)); }

i64 lcm(const vector<i64>& v) { return v.empty() ? 0LL : accumulate(v.begin() + 1, v.end(), v[0], static_cast<i64(*)(i64, i64)>(lcm)); }

i64 pow(i64 x, i64 y, i64 z) { i64 a = 1; while (y > 0) { if (y & 1) a = a * x % z; x = x * x % z; y /= 2; } return a; }

i64 inv(i64 x, i64 m) { return pow(x, m - 2, m); }



#define COMP(key) [](const auto& a, const auto& b) { return a.key < b.key; }



struct InitCpp { InitCpp() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); } } 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;

  vector<i64> AB(x * y);

  REP(i, x) {

    REP(j, y) {

      AB[i * y + j] = A[i] + B[j];

    }

  }

  sort(ALL(AB));

  i32 w = min(k, x * y);

  vector<i64> ABC(w * z);

  REP(i, w) {

    REP(j, z) {

      ABC[i * z + j] = AB[AB.size() - i - 1] + C[j];

    }

  }

  sort(ALL(ABC));

  auto iter = ABC.end();

  REP(_, k) {

    iter--;

    cout << *iter << endl;

  }

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

#include <functional>

#include <set>

using namespace std;



using i32 = int;

using i64 = long long;



#define REP(i, stop) for (register int i = 0; i < stop; ++i)



template<typename T>

T read() {

  T a = 0;

  register int c;

  for(;;) {

    c = getchar_unlocked();

    if (c & 16) {

      a = a * 10 + c - 48;

    } else {

      return a;

    }

  }

}



void writeln(i64 a) {

  char buf[20];

  register int i = 0;

  // if (a <= 0)

  while (a > 0) {

    buf[i++] = a % 10;

    a = a / 10;

  }

  while (i > 0) {

    putchar_unlocked(buf[--i] + 48);

  }

  putchar_unlocked('\n');

}



i64 A[1000], B[1000], C[1000];

i64 ABC[3000];

signed main() {

  i32 X = read<i32>(),

      Y = read<i32>(),

      Z = read<i32>(),

      K = read<i32>();

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

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

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

  sort(A, A + X, greater<i64>());

  sort(B, B + Y, greater<i64>());

  sort(C, C + Z, greater<i64>());

  i64 A0 = A[0],

      B0 = B[0],

      C0 = C[0];

  REP(i, X) A[i] = A0 - A[i];

  REP(i, Y) B[i] = B0 - B[i];

  REP(i, Z) C[i] = C0 - C[i];

  i64 l = 0,

      r = A0 + B0 + C0,

      m;

  while (l < r) {

    m = (l + r) / 2;

    i32 cnt = 0;

    REP(i, X) {

      if (A[i] > m) break;

      REP(j, Y) {

        if (A[i] + B[j] > m) break;

        REP(k, Z) {

          if (A[i] + B[j] + C[k] > m) break;

          ++cnt;

          if (cnt >= K) {

            r = m;

            goto NEXT;

          }

        }

      }

    }

    l = m + 1;

    NEXT:;

  }

  i32 c = 0;

  REP(i, X) {

    if (A[i] >= l) break;

    REP(j, Y) {

      if (A[i] + B[j] >= l) break;

      REP(k, Z) {

        if (A[i] + B[j] + C[k] >= l) break;

        ABC[c++] = A[i] + B[j] + C[k];

      }

    }

  }

  sort(ABC, ABC + c);

  REP(i, c) {

    writeln(A0 + B0 + C0 - ABC[i]);

  }

  REP(_, K - c) {

    writeln(A0 + B0 + C0 - l);

  }

}

// Fastest known solution for this problem: