ls = list(map(int,input().split())) if ls[-1] == 1: print("SURVIVED") exit() if ls[:3].count(1) < 2: print("SURVIVED") exit() print('DEAD')