import sequtils,strutils,math var A = stdin.readline.split.map(parseInt) if sum(A[0..2]) > 1 and A[3] == 0: echo "DEAD" else: echo "SURVIVED"