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