d = Array.new(3) d[0], d[1], d[2] , a = gets.split.map(&:to_i) if d.count(1) < 2 || a == 1 then puts "SURVIVED" else puts "DEAD" end