ls=list(input()) cnt=0 for i in range(3): if ls[i]=='1': cnt+=1 if cnt<2 or ls[3]=='1': print("SURVIVED") else: print("DEAD")