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

typedef long long int LL;
typedef long long int LLint;

//Faster Program
#define endl "\n"

//Faster Coding
#define ED return
#define GET(a) int a;cin >> a
#define DGET(a) double a;cin >> a
#define SGET(a) string a;cin >> a
#define CGET(a) char a;cin >> a
#define PRINT(a) cout << a << "\n"
#define ANS(a,b) int a;cin >> a;cout << b << "\n"
#define FOR(n) for(int i = 0;i < n;i++)
#define SORT(vec) sort(vec.begin(),vec.end())
#define REV(vec) reverse(vec.begin(),vec.end())

//As Function
#define UP(a,b) ((a+(b-1))/b)
#define ipow(x,y) LL(pow(x,y))

//Debug
#define TEST cout << "OK\n"

const double PI = M_PI;
const long long INF = int(999999999);
const long long LLINF = LL(99999999999);
const long long MOD = int(1000000007);

//Settings
const bool DO_BENCHMARK = false;
const int DOUBLE_ACCURACY = 15;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(DOUBLE_ACCURACY);
    void solve();
    if(DO_BENCHMARK){
        clock_t clock_start = clock();
        solve();
        clock_t clock_end = clock();
        const double time = static_cast<double>(clock_end-clock_start)/CLOCKS_PER_SEC*1000.0;
        cout << "\n" << time << "[ms]\n";
    }
    else solve();
}

void solve(){
    LL X, Y, Z, K;
    cin >> X >> Y >> Z >> K;
    vector<LL> dA (X);
    vector<LL> dB (Y);
    vector<LL> dC (Z);
    for(LL i = 0;i < X;i++){
        cin >> dA[i];
    }
    for(LL i = 0;i < Y;i++){
        cin >> dB[i];
    }
    for(LL i = 0;i < Z;i++){
        cin >> dC[i];
    }
    SORT(dA);
    REV(dA);
    SORT(dB);
    REV(dB);
    SORT(dC);
    REV(dC);
    LL max = dA[0] + dB[0] + dC[0];
    vector<LL> A (X);
    vector<LL> B (Y);
    vector<LL> C (Z);
    for(LL i = 1;i < X;i++){
        A[i] = dA[i-1]-dA[i];
//        cout << A[i] << ",";
    }
//    cout << endl;
    A[0] = 0;
    for(LL i = 1;i < Y;i++){
        B[i] = dB[i-1]-dB[i];
//        cout << B[i] << ",";
    }
//    cout << endl;
    B[0] = 0;
    for(LL i = 1;i < Z;i++){
        C[i] = dC[i-1]-dC[i];
//        cout << C[i] << ",";
    }
//    cout << endl;
    C[0] = 0;

    vector<pair<LL,tuple<LL,LL,LL>>> ans;
    ans.push_back(make_pair(0,make_tuple(0,0,0)));
    for(LL i = 0;i < K;i++){
        cout << max-ans[i].first << endl;
//        cout << max-ans[i].first << "(" << get<0>(ans[i].second) << "," << get<1>(ans[i].second) << "," << get<2>(ans[i].second) << ")" << endl;
        if(get<0>(ans[i].second)+1 < X)ans.push_back(make_pair(ans[i].first+A[get<0>(ans[i].second)+1],make_tuple(get<0>(ans[i].second)+1,get<1>(ans[i].second),get<2>(ans[i].second))));
        if(get<1>(ans[i].second)+1 < Y)ans.push_back(make_pair(ans[i].first+B[get<1>(ans[i].second)+1],make_tuple(get<0>(ans[i].second),get<1>(ans[i].second)+1,get<2>(ans[i].second))));
        if(get<2>(ans[i].second)+1 < Z)ans.push_back(make_pair(ans[i].first+C[get<2>(ans[i].second)+1],make_tuple(get<0>(ans[i].second),get<1>(ans[i].second),get<2>(ans[i].second)+1)));
        SORT(ans);
        while(get<0>(ans[i].second)==get<0>(ans[i+1].second) &&
              get<1>(ans[i].second)==get<1>(ans[i+1].second) &&
              get<2>(ans[i].second)==get<2>(ans[i+1].second)){
            ans[i+1].first = LLINF;
            SORT(ans);
        }
    }

//    for(int i = 0;i < ans.size();i++){
//        cout << max-ans[i].first << "(" << get<0>(ans[i].second) << "," << get<1>(ans[i].second) << "," << get<2>(ans[i].second) << ")" << endl;
//    }
}


Measured memory_bytes: 1024