DS = list(map(int, input().split())) c = len(DS) i,d,s = 0,0,0 for i in range(c): if d > 2: print('DEAD') break elif DS[i] == 1: d += 1 elif DS[i] == 0: print('SURVIVED') break