import sys input=lambda: sys.stdin.readline().rstrip() A=[int(i) for i in input().split()] if sum(A[:3])>=2 and A[-1]==0: print("DEAD") else: print("SURVIVED")