package me.yukicoder.lv1; import java.util.Scanner; public class No0431 { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in)) { int[] flg = new int[3]; for (int i = 0; i < 3; i++) { flg[i] = sc.nextInt(); } int S = sc.nextInt(); System.out.println(checkFlg(S, flg)); } } static String checkFlg(int S, int[] flg) { if (S == 1) { return "SURVIVED"; } int cntDeadFlg = 0; for (int f : flg) { if (f == 1) cntDeadFlg++; } if (cntDeadFlg < 2) return "SURVIVED"; return "DEAD"; } }