import java.util.Scanner; public class A{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int d[] = new int[4]; int cut=0; for(int i=0;i<4;i++){ d[i] = Integer.parseInt(s.next()); if(d[i] == 1){ cut++; } if(i == 3 && d[3] == 1){ System.out.println("SURVIVED"); break; } if(cut>=2){ System.out.println("DEAD"); break; } if(i == 3){ System.out.println("SURVIVED"); } } } }