A = input().split() if A[3] == "1": ans = "SURVIVED" elif A.count("1") > 1: ans = "DEAD" else: ans = "SURVIVED" print(ans)