import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No431 { public static void main(String[] args) throws IOException{ String[] D = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" "); int flags = 0; for(int i=0; i < D.length - 1; i++) flags += Integer.parseInt(D[i]); if(flags < 2 || D[3].equals("1")) System.out.println("SURVIVED"); else System.out.println("DEAD"); } }