*d, s = gets.split.map &:to_i puts d.sort[1] > s ? :DEAD : :SURVIVED