#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>

typedef long long ll;
int X, Y, Z, K;
std::vector<ll> A, B, C;



void sol_1 (){
  std::vector<ll> ABsum;
  for(int i=0; i<X; i++)  for(int j=0; j<Y; j++) ABsum.push_back(A[i]+B[j]);
  std::sort(ABsum.begin(), ABsum.end(), std::greater<ll>() );

  std::vector<ll> ABCsum;
  for(int i=0; i<std::min(X*Y,K); i++) for( int j=0; j<Z; j++) ABCsum.push_back(ABsum[i]+C[j]);
  std::sort(ABCsum.begin(), ABCsum.end(), std::greater<ll>() );

  for(int i=0; i<K ; i++) std::cout << ABCsum[i] << std::endl;
}



void sol_2 () {
  std::vector<ll> ABCsum;

  for(int i=0; i<X; i++){
    for(int j=0; j<Y; j++){
      for(int k=0; k<Z; k++){
        if ( i*j*k > K ) break;
        ABCsum.push_back(A[i]+B[j]+C[k]);
      }
    }
  }

  std::sort(ABCsum.begin(), ABCsum.end(), std::greater<ll>() );
  for(int i=0; i<K ; i++) std::cout << ABCsum[i] << std::endl;
}




struct Pair {
  ll sum;
  int x; int y; int z;
};
bool operator< (const Pair &p, const Pair &q) { return p.sum < q.sum; }

void sol_3 () {
  std::vector<std::vector<std::vector<int>>> memo;
  memo.resize(X); for(int i=0; i<X; i++) memo[i].resize(Y); for(int i=0; i<X; i++) for(int j=0; j<Y; j++) memo[i][j].assign(Z, 0);

  std::priority_queue<Pair, std::vector<Pair>, std::less<Pair>> Q;
  Q.push( {A[0]+B[0]+C[0], 0, 0, 0} );
  for(int i=0; i<K; i++){
    Pair cur = Q.top();
    std::cout << cur.sum << std::endl; Q.pop();
    if ( cur.x+1 < X && memo[cur.x+1][cur.y][cur.z] == 0 ) {
      Q.push( {A[cur.x+1]+B[cur.y]+C[cur.z], cur.x+1, cur.y, cur.z  } );
      memo[cur.x+1][cur.y][cur.z] = 1;
    }
    if ( cur.y+1 < Y && memo[cur.x][cur.y+1][cur.z] == 0 ) {
      Q.push( {A[cur.x]+B[cur.y+1]+C[cur.z], cur.x, cur.y+1, cur.z  } );
      memo[cur.x][cur.y+1][cur.z] = 1;
    }
    if ( cur.z+1 < Z && memo[cur.x][cur.y][cur.z+1] == 0 ) {
      Q.push( {A[cur.x]+B[cur.y]+C[cur.z+1], cur.x, cur.y, cur.z+1  } );
      memo[cur.x][cur.y][cur.z+1] = 1;
    }
  }
}


bool judge ( ll P ) {
  ll rtn = 0;
  for(int i=0; i<X; i++){
    for(int j=0; j<Y; j++){
      for(int k=0; k<Z; k++){
        if ( A[i]+B[j]+C[k] < P ) break;
        rtn++;
        if ( rtn > K ) return true;
      }
    }
  }
  return false;
}

ll binary_search(ll P1, ll P2){
  if ( P1 == P2 ) return P1;
  ll center = std::floor((double)(P1+P2)/2);
  if ( judge(center) ) return binary_search(P1, center+1);
  else return binary_search(center, P2);
}

void sol_4 () {
  // find Boarder P
  ll boarder = binary_search(A[0]+B[0]+C[0], A[X-1]+B[Y-1]+C[Z-1]);

  std::vector<ll> ABCsum;
  for(int i=0; i<X; i++){
    for(int j=0; j<Y; j++){
      for(int k=0; k<Z; k++){
        if ( A[i]+B[j]+C[k] < boarder ) break;
        ABCsum.push_back(A[i]+B[j]+C[k]);
      }
    }
  }

  std::sort(ABCsum.begin(), ABCsum.end(), std::greater<ll>() );
  for(int i=0; i<K ; i++) std::cout << ABCsum.at(i) << std::endl;
}



int main (void){
  std::cin >> X >> Y >> Z >> K;
  for(int i=0; i<X; i++) {
    ll t_; std::cin >> t_;
    A.push_back(t_);
  }
  for(int i=0; i<Y; i++) {
    ll t_; std::cin >> t_;
    B.push_back(t_);
  }
  for(int i=0; i<Z; i++) {
    ll t_; std::cin >> t_;
    C.push_back(t_);
  }



  sol_1();
  //std::sort(A.begin(), A.end(), std::greater<ll>() );
  //std::sort(B.begin(), B.end(), std::greater<ll>() );
  //std::sort(C.begin(), C.end(), std::greater<ll>() );
  //sol_2();
  //sol_3();
  //sol_4();
  return 0;
}


Measured memory_bytes: 43256