fullname = favouritefruit = 
needspeeling = seedsremoved = false
otherfamily = []

IO.foreach() do |line|
  line.chomp!
  key, value = line.split(nil, 2)
  case key
  when /^([
  when ; fullname = value
  when ; favouritefruit = value
  when ; needspeeling = true
  when ; seedsremoved = true
  when ; otherfamily = value.split().map(&:strip)
  when /^./; puts 
  end
end

puts 
puts 
puts 
puts 
otherfamily.each_with_index do |name, i|
  puts 
end