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