flag = input().split(" ") if flag[3] == "1": print("SURVIVED") else: if flag[:3].count("1") >= 2: print("DEAD") else: print("SURVIVED")