import java.util.Scanner

object MainKt {
	@JvmStatic
	fun main(args: Array<String>) {
		val scanner = Scanner(System.`in`)
		val x = scanner.nextInt()
		val y = scanner.nextInt()
		val z = scanner.nextInt()
		val k = scanner.nextInt()
		val a = LongArray(x)
		val b = LongArray(y)
		val c = LongArray(z)
		for (i in 0 .. x-1) a[i] = scanner.nextLong()
		for (i in 0 .. y-1) b[i] = scanner.nextLong()
		for (i in 0 .. z-1) c[i] = scanner.nextLong()

		a.sort()
		a.reverse()
		b.sort()
		b.reverse()
		c.sort()
		c.reverse()

		val map = mutableMapOf<Long, Int>()
		for (i in 0 .. Math.min(k,x)-1){
			for (j in 0 .. Math.min(k/(i+1), y)-1) {
				for (l in 0 .. Math.min(k/(i+1)/(j+1), z)-1){
					val v = a[i]+b[j]+c[l]
					map[v] = map[v]?.plus(1) ?: 1
				}
			}
		}
		val keys = map.keys.sortedDescending()
		var cnt = 0
		keys.forEach {
			val times = Math.min(k-cnt, map[it]!!)
			for (i in 1..times) println(it)
			cnt += times
		}

	}
}