k = gets.split(" ").map{|t| t.to_i}
a = gets.split(" ").map{|t| t.to_i}.sort{|x,y| y<=>x}
b = gets.split(" ").map{|t| t.to_i}.sort{|x,y| y<=>x}
c = gets.split(" ").map{|t| t.to_i}.sort{|x,y| y<=>x}

kari = Array.new
a.each{|an|
b.each{|bn|
    kari.push(an+bn)
}
}