flag_list = [int(i) for i in input().split()] if flag_list[-1] == 1: print("SURVIVED") elif flag_list.count(1) > 2: print("DEAD") else: print("SURVIVED")