flags_list = list(input().split()) print("SURVIVED" if (flags_list[0:3].count("1") < 2) or (flags_list[3] == "1") else "DEAD")