#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> P;

int main(){
    int x, y, z, k;
    cin >> x >> y >> z >> k;
    vector<LL> a(x), b(y), c(z);
    for(int i = 0;i < x;i++)    cin >> a[i];
    for(int i = 0;i < y;i++)    cin >> b[i];
    for(int i = 0;i < z;i++)    cin >> c[i];
    vector<LL> ab;
    for(auto s : a) for(auto t : b) ab.push_back(s+t);
    sort(ab.rbegin(), ab.rend());
    vector<LL> abk(k), abc;
    copy(ab.begin(), ab.begin()+min(k, (int)ab.size()), abk.begin());
    for(auto s : abk)   for(auto t : c) abc.push_back(s+t);
    sort(abc.rbegin(), abc.rend());
    for(int i = 0;i < k;i++)    cout << abc[i] << endl;
}