L = list(map(int,input().split())) if L[-1] == 0 and sum(L[:-1]) >= 2 : print("DEAD") else : print("SURVIVED")