# -*- coding: utf-8 -*-

"""

D - Cake 123

https://atcoder.jp/contests/abc123/tasks/abc123_d



"""

import sys





from itertools import product



def solve(X, Y, Z, K, A, B, C):

    # TLE

    res_AB = sorted([sum(p) for p in product(A, B)], reverse=True)[:K]

    return sorted([sum(p) for p in product(res_AB, C)], reverse=True)[:K]





def main(args):

    X, Y, Z, K = map(int, input().split())

    A = [int(a) for a in input().split()]

    B = [int(b) for b in input().split()]

    C = [int(c) for c in input().split()]

    ans = solve(X, Y, Z, K, A, B, C)

    print(*ans, sep='\n')





if __name__ == '__main__':

    main(sys.argv[1:])

# -*- coding: utf-8 -*-

"""

D - Cake 123

https://atcoder.jp/contests/abc123/tasks/abc123_d

AC

"""

import sys





from itertools import product



def solve(X, Y, Z, K, A, B, C):

    # 解説の解法#2

    A.sort(reverse=True)

    B.sort(reverse=True)

    C.sort(reverse=True)

    res = []

    for i, a in enumerate(A, start=1):

        for j, b in enumerate(B, start=1):

            for k, c in enumerate(C, start=1):

                if i*j*k > K:

                    break

                res.append(a+b+c)

    return sorted(res, reverse=True)[:K]





def main(args):

    X, Y, Z, K = map(int, input().split())

    A = [int(a) for a in input().split()]

    B = [int(b) for b in input().split()]

    C = [int(c) for c in input().split()]

    ans = solve(X, Y, Z, K, A, B, C)

    print(*ans, sep='\n')





if __name__ == '__main__':

    main(sys.argv[1:])

# -*- coding: utf-8 -*-
"""
D - Cake 123
https://atcoder.jp/contests/abc123/tasks/abc123_d
"""
import sys
from itertools import product


def solve(X, Y, Z, K, A, B, C):
    # TLE
    res_AB = sorted([sum(p) for p in product(A, B)], reverse=True)[:K]
    return sorted([sum(p) for p in product(res_AB, C)], reverse=True)[:K]


def main(args):
    X, Y, Z, K = map(int, input().split())
    A = [int(a) for a in input().split()]
    B = [int(b) for b in input().split()]
    C = [int(c) for c in input().split()]
    ans = solve(X, Y, Z, K, A, B, C)
    print(*ans, sep="\n")


if __name__ == "__main__":
    main(sys.argv[1:])

# -*- coding: utf-8 -*-
"""
D - Cake 123
https://atcoder.jp/contests/abc123/tasks/abc123_d
AC
"""
import sys
from itertools import product


def solve(X, Y, Z, K, A, B, C):
    # 解説の解法#2
    A.sort(reverse=True)
    B.sort(reverse=True)
    C.sort(reverse=True)
    res = []
    for i, a in enumerate(A, start=1):
        for j, b in enumerate(B, start=1):
            for k, c in enumerate(C, start=1):
                if i * j * k > K:
                    break
                res.append(a + b + c)
    return sorted(res, reverse=True)[:K]


def main(args):
    X, Y, Z, K = map(int, input().split())
    A = [int(a) for a in input().split()]
    B = [int(b) for b in input().split()]
    C = [int(c) for c in input().split()]
    ans = solve(X, Y, Z, K, A, B, C)
    print(*ans, sep="\n")


if __name__ == "__main__":
    main(sys.argv[1:])

+AC -    # TLE -    res_AB = sorted([sum(p) for p in product(A, B)], reverse=True)[:K] -    return sorted([sum(p) for p in product(res_AB, C)], reverse=True)[:K] +    # 解説の解法#2 +    A.sort(reverse=True) +    B.sort(reverse=True) +    C.sort(reverse=True) +    res = [] +    for i, a in enumerate(A, start=1): +        for j, b in enumerate(B, start=1): +            for k, c in enumerate(C, start=1): +                if i * j * k > K: +                    break +                res.append(a + b + c) +    return sorted(res, reverse=True)[:K]