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