object Main extends App {
  var count = readLine.split(" ")
  var a, b , c = readLine.split(" ")
  var sum = for(v1 <- a; v2 <- b; v3 <- c) yield {
  		v1.toLong + v2.toLong + v3.toLong
	}
  sum = sum.sorted
  sum = sum.reverse
  for(i <- 0 to count(3).toLong - 1){
  println(sum(i))
  }
}