*d, s = gets.split.map(&:to_i) puts(d.count(1) <= 1 || s == 1 ? :SURVIVED : :DEAD)