n=[*map(int,input().split())] if n[-1]==1: print('SURVIVED') elif sum(n[:3])>=2: print('DEAD') else: print('SURVIVED')