input = gets.split(" ").map{|i|i.to_i} count = 0 if input[3] == 1 puts "SURVIVED" else for j in 0..2 if input[j] == 1 count += 1 end end if count < 2 puts "SURVIVED" else puts "DEAD" end end# your code goes here