def main():

    import sys



    input = sys.stdin.readline



    x, y, z, k = map(int, input().split())

    A = sorted(map(int, input().split()), reverse=True)

    B = sorted(map(int, input().split()), reverse=True)

    C = sorted(map(int, input().split()), reverse=True)



    ret = []

    for p, a in enumerate(A):

        for q, b in enumerate(B):

            if p * q > k:

                break

            for r, c in enumerate(C):

                if p * q * r > k:

                    break

                ret.append(a + b + c)

    ret.sort(reverse=True)

    print(*ret[:k], sep='\n')





main()



# O(Klog^3K)

# https://img.atcoder.jp/abc123/editorial.pdf

def main():

    import sys



    input = sys.stdin.readline



    x, y, z, k = map(int, input().split())

    A = sorted(map(int, input().split()), reverse=True)

    B = sorted(map(int, input().split()), reverse=True)

    C = sorted(map(int, input().split()), reverse=True)



    ret = []

    for p, a in enumerate(A, 1):

        for q, b in enumerate(B, 1):

            if p * q > k:

                break

            for r, c in enumerate(C, 1):

                if p * q * r > k:

                    break

                ret.append(a + b + c)

    ret.sort(reverse=True)

    print(*ret[:k], sep='\n')





main()



# O(Klog^3K)

# https://img.atcoder.jp/abc123/editorial.pdf

# Enumerateのindex間違えていた

def main():
    import sys

    input = sys.stdin.readline
    x, y, z, k = map(int, input().split())
    A = sorted(map(int, input().split()), reverse=True)
    B = sorted(map(int, input().split()), reverse=True)
    C = sorted(map(int, input().split()), reverse=True)
    ret = []
    for p, a in enumerate(A):
        for q, b in enumerate(B):
            if p * q > k:
                break
            for r, c in enumerate(C):
                if p * q * r > k:
                    break
                ret.append(a + b + c)
    ret.sort(reverse=True)
    print(*ret[:k], sep="\n")


main()
# O(Klog^3K)
# https://img.atcoder.jp/abc123/editorial.pdf

def main():
    import sys

    input = sys.stdin.readline
    x, y, z, k = map(int, input().split())
    A = sorted(map(int, input().split()), reverse=True)
    B = sorted(map(int, input().split()), reverse=True)
    C = sorted(map(int, input().split()), reverse=True)
    ret = []
    for p, a in enumerate(A, 1):
        for q, b in enumerate(B, 1):
            if p * q > k:
                break
            for r, c in enumerate(C, 1):
                if p * q * r > k:
                    break
                ret.append(a + b + c)
    ret.sort(reverse=True)
    print(*ret[:k], sep="\n")


main()
# O(Klog^3K)
# https://img.atcoder.jp/abc123/editorial.pdf
# Enumerateのindex間違えていた

-    for p, a in enumerate(A): -        for q, b in enumerate(B): +    for p, a in enumerate(A, 1): +        for q, b in enumerate(B, 1): -            for r, c in enumerate(C): +            for r, c in enumerate(C, 1): +# Enumerateのindex間違えていた