*d, s = input().split() if "1" in s: print("SURVIVED") elif d.count("1") >= 2: print("DEAD") elif d.count("1") < 2: print("SURVIVED")