package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"sort"
	"strconv"
)

func main() {
	x, y, z, k := readInt(), readInt(), readInt(), readInt()
	a := make([]int, x)
	for i := range a {
		a[i] = readInt()
	}
	b := make([]int, y)
	for i := range b {
		b[i] = readInt()
	}
	c := make([]int, z)
	for i := range c {
		c[i] = readInt()
	}

	ab := make([]int, 0)
	for i := range a {
		for j := range b {
			ab = append(ab, a[i]+b[j])
		}
	}

	sort.Sort(sort.Reverse(sort.IntSlice(ab)))
	sort.Sort(sort.Reverse(sort.IntSlice(c)))

	kk := min(len(ab), k)
	abc := make([]int, 0)
	for i := 0; i < kk; i++ {
		for j := range c {
			abc = append(abc, ab[i]+c[j])
		}
	}
	sort.Sort(sort.Reverse(sort.IntSlice(abc)))

	for i := 0; i < k; i++ {
		fmt.Println(abc[i])
	}
}

func main2() {
	x, y, z, k := readInt(), readInt(), readInt(), readInt()
	a := make([]int, x)
	for i := range a {
		a[i] = readInt()
	}
	b := make([]int, y)
	for i := range b {
		b[i] = readInt()
	}
	c := make([]int, z)
	for i := range c {
		c[i] = readInt()
	}

	sort.Sort(sort.Reverse(sort.IntSlice(a)))
	sort.Sort(sort.Reverse(sort.IntSlice(b)))
	sort.Sort(sort.Reverse(sort.IntSlice(c)))

	kk, diffa := 0, 0
	for ai := 0; ai < x; ai++ {
		if ai == x-1 {
			diffa = math.MaxInt64
		} else {
			diffa = a[ai] - a[ai+1]
		}

		diffb := -1
		for bi := 0; bi < x; bi++ {
			if diffb == -1 {
				diffb = 0
			} else {
				diffb += b[bi-1] - b[bi]
			}
			if diffb > diffa {
				break
			}

			diffc := -1
			for ci := 0; ci < x; ci++ {
				if diffc == -1 {
					diffc = 0
				} else {
					diffc += c[ci-1] - c[ci]
				}
				if diffb+diffc > diffa {
					break
				}

				fmt.Println(ai, bi, ci, a[ai]+b[bi]+c[ci])
				kk++
				if kk == k {
					return
				}
			}
		}
	}
}

func main1() {
	x, y, z, k := readInt(), readInt(), readInt(), readInt()
	a := make([]int, x)
	for i := range a {
		a[i] = readInt()
	}
	b := make([]int, y)
	for i := range b {
		b[i] = readInt()
	}
	c := make([]int, z)
	for i := range c {
		c[i] = readInt()
	}

	sort.Sort(sort.Reverse(sort.IntSlice(a)))
	sort.Sort(sort.Reverse(sort.IntSlice(b)))
	sort.Sort(sort.Reverse(sort.IntSlice(c)))

	ai, bi, ci := 0, 0, 0
	for l := 0; l < k; l++ {
		fmt.Println(l, ai, bi, ci)
		sum := a[ai] + b[bi] + c[ci]
		fmt.Println(a[ai] + b[bi] + c[ci])

		asum, bsum, csum := 0, 0, 0
		if ai+1 < x {
			asum = sum - a[ai] + a[ai+1]
		}
		if bi+1 < y {
			bsum = sum - b[bi] + b[bi+1]
		}
		if ci+1 < z {
			csum = sum - c[ci] + c[ci+1]
		}

		if asum > bsum && asum > csum {
			ai++
		} else if bsum > csum {
			bi++
		} else {
			ci++
		}
	}
}

// sort ------------------------------------------------------------

type xxx struct {
	x int
}

type sortArray []xxx

func (s sortArray) Len() int           { return len(s) }
func (s sortArray) Swap(i, j int)      { s[i], s[j] = s[j], s[i] }
func (s sortArray) Less(i, j int) bool { return s[i].x < s[j].x }

// -----------------------------------------------------------------

var (
	readString func() string
	readBytes  func() []byte
)

func init() {
	readString, readBytes = newReadString(os.Stdin)
}

func newReadString(ior io.Reader) (func() string, func() []byte) {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	f1 := func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
	f2 := func() []byte {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Bytes()
	}
	return f1, f2
}

func readInt() int {
	return int(readInt64())
}

func readInt64() int64 {
	i, err := strconv.ParseInt(readString(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(readString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func sum(a []int) int {
	var ret int
	for i := range a {
		ret += a[i]
	}
	return ret
}

func sumFloat64(a []float64) float64 {
	var ret float64
	for i := range a {
		ret += a[i]
	}
	return ret
}

func gcd(m, n int) int {
	for m%n != 0 {
		m, n = n, m%n
	}
	return n
}

func lcm(m, n int) int {
	return m / gcd(m, n) * n
}


Measured memory_bytes: 116608