ds = list(map(int, input().split())) if ds[-1] == 1 or sum(ds[:3]) <= 1: print('SURVIVED') else: print('DEAD')