x,y,z,k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i).sort
b = gets.split.map(&:to_i).sort
c = gets.split.map(&:to_i).sort
abc = []

# puts x
# puts y
# puts z
# puts k
# abc = []
# abc[0] = a[x - 1] + b[y - 1] + c[z - 1]
# x = x - 1
# y = y - 1
# z = z - 1
#
# for i in 0 .. k - 2
#   if a[x] - a[x - 1] < b[y] - b[y - 1] && a[x] - a[x - 1] < c[z] - c[z - 1]
#     abc[i + 1] = abc[i] - a[x] + a[x - 1]
#     x = x - 1
#   elsif b[y] - b[y - 1] < c[z] - c[z - 1]
#     abc[i + 1] = abc[i] - b[y] + b[y - 1]
#     y = y - 1
#   else
#     abc[i + 1] = abc[i] - c[z] + z[z - 1]
#     a = z - 1
#   end
# end
#
# puts abc

for i in 1 .. x
  for j in 1 .. y
    for l in 1 .. z
      if i * j * l <= k
         abc.push(a[x - i] + b[y - j] + c[z - l])
      end
    end
  end
end

# puts abc.sort

abc2 = abc.sort.reverse
#
for i in 0 .. k - 1
  puts abc2[i]
end
