flags = list(map(int, input().split())) if flags[3] == 1: print('SURVIVED') elif flags[:3].count(1) < 2: print('SURVIVED') else: print('DEAD')