import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.stream.Stream; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); int[] flags = Stream.of(inputs).mapToInt(Integer::parseInt).toArray(); if(flags[3]==1) { System.out.println("SURVIVED"); } else { int deadCounter = 0; for (int i = 0; i < 3; i++) { if (flags[i] == 1) { deadCounter += 1; } } if(deadCounter>=2){ System.out.println("DEAD"); } else { System.out.println("SURVIVED"); } } } }