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


void solve(long long X, long long Y, long long Z, long long K, std::vector<long long> A, std::vector<long long> B, std::vector<long long> C){
    vector<long long> ab_ans;
    for (int i = 0; i < X; i++) {
        for (int j = 0; j < Y; j++) {
            ab_ans.push_back(A[i] + B[j]);
        }
    }
    std::sort(ab_ans.begin(), ab_ans.end(), std::greater<long long>() );
    long long ab_max = 3000;
    vector<long long> abc_ans;
    long long min_num = min(ab_max, X * Y);
    for (int i = 0; i < min_num; i++) {
        for (int j = 0; j < Z; j++) {
            abc_ans.push_back(ab_ans[i] + C[j]);
        }
    }
    std::sort(abc_ans.begin(), abc_ans.end(), std::greater<long long>() );
    for (int i=0; i<K; i++) {
        cout << abc_ans[i] << endl;
    }
}

// Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long X;
    long long Y;
    long long Z;
    long long K;
    cin >> X >> Y >> Z >> K;
    std::vector<long long> A(X);
    for(int i = 0 ; i < X ; i++){
        cin >> A[i];
    }
    std::vector<long long> B(Y);
    for(int i = 0 ; i < Y ; i++){
        cin >> B[i];
    }
    std::vector<long long> C(Z);
    for(int i = 0 ; i < Z ; i++){
        cin >> C[i];
    }
    solve(X, Y, Z, K, std::move(A), std::move(B), std::move(C));
    return 0;
}
