#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"from subprocess import*\n"
"cmd=['pypy3','-c',"""\n"
"def solve(p,q):\n"
"  return sorted(i+j for i in p for j in q)[-k:]\n"
"x,y,z,k=map(int,input().split())\n"
"a=list(map(int,input().split()))\n"
"b=list(map(int,input().split()))\n"
"c=list(map(int,input().split()))\n"
"for i in solve(solve(a,b),c)[::-1]:\n"
"  print(i)\n"
""""]\n"
"call(cmd)\n"
"\"";
  system(s);
  return 0;
}            