import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines *D,S = map(int,read().split()) bl = S or (sum(D) < 2) answer = 'SURVIVED' if bl else 'DEAD' print(answer)