*d, s = gets.split.map(&:to_i) ans = ["SURVIVED", "DEAD"] if s == 1 puts ans[0] else sum = d.inject(:+) if sum < 2 puts ans[0] else puts ans[1] end end