l = input().split() bin_bal = int(str("".join(l)),2) print("SURVIVED") if bin_bal % 2 or not bin_bal in [6,10,12,14] else print("DEAD")