import java.util.Scanner; public class DeathFlag { public static void main(String[] args){ Scanner kb=new Scanner(System.in); int s,df[]={0,0,0}; int t=0; int count=0; for(int i=0;i<3;i++){ df[i]=kb.nextInt(); } s=kb.nextInt(); if(s==1){ System.out.println("SURVIVED"); }else{ for(int i=0;i<3;i++){ if(df[i]==1){ count++; } } if(count>=2&&t!=1){ System.out.println("DEAD"); }else if(t!=1){ System.out.println("SURVIVED"); } } } }