import java.util.Scanner; import java.util.Arrays; import java.math.BigDecimal; public class a{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int d=sc.nextInt(); if(d==1){ System.out.println("SURVIVED"); }else if(a==1&&b==1 || a==1&&c==1 || b==1&&c==1){ System.out.println("SURVIVED"); }else{ System.out.println("DEAD"); } } }