f=map(int, raw_input().split()) c=0 for a in range(len(f)-1): if f[a] == 1: c+=1 if c<2 or f[3]==1: print 'SURVIVED' else: print 'DEAD'