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