n = gets.split.map(&:to_i) cnt = 0 for i in 0..2 if n[i]==1 cnt+=1 end end if cnt < 2 || n[3]==1 puts 'SURVIVED' else puts 'DEAD' end