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