def solve(): line = input().split(' ') deadFlg = int(line[0]) + int(line[1]) + int(line[2]) surviveflg = bool(line[3]) if (surviveflg): print("SURVIVED") return if (deadFlg > 2): print("DEAD") else: print("SURVIVED") solve()