import java.util.Scanner; class no431{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); int d[]=new int[3],s,a=0,i; d[0]=stdIn.nextInt(); d[1]=stdIn.nextInt(); d[2]=stdIn.nextInt(); s=stdIn.nextInt(); for(i=0;i<3;i++) if(d[i]==1) a++; if(s==1) System.out.print("SURVIVED"); else if(a>=2) System.out.print("DEAD"); else System.out.print("SURVIVED"); } }