a=list(map(int,input().split())) print("SURVIVED" if a[-1]==1 or a[:3].count(1)<2 else"DEAD")