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