import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int d1=sc.nextInt(); int d2=sc.nextInt(); int d3=sc.nextInt(); int s=sc.nextInt(); int count=0; if(d1==1)count++; if(d2==1)count++; if(d3==1)count++; if(s==1)count=0; if(count >= 2){ System.out.println("DEAD"); }else if(count <2){ System.out.println("SURVIVED"); } sc.close(); } }