s=input() print('DEAD' if s[-1]!='1' and s.count('1')>1 else 'SURVIVED')