data = list(map(int, input().split())) if data[-1] == "1" or sum(data[:-1]) < 3: print("SURVIVED") else: print("DEAD")