S=input() print(('DEAD','SURVIVED')[S.count('1')<2+int(S[6])*9])