import java.util.*; public class Exercise155 { public static void main(String[] args){ String sStr = "SURVIVED"; String dStr = "DEAD"; Scanner sc = new Scanner(System.in); int count = 0; for(int i = 0; i < 3; i++){ if(sc.nextInt() == 1){ count++; } } int s = sc.nextInt(); if(s == 1){ System.out.println(sStr); }else{ if(count < 2){ System.out.println(sStr); }else{ System.out.println(dStr); } } } }