s = list(map(int, input().split())) dead = 0 if s[-1] == 1: print('SURVIVED') else: for i in s: if i == 1: dead += 1 if dead >= 2: print('DEAD') else: print('SURVIVED')