d=input().split();s=d[-1] d=d[:-1] print('SERVIVED' if s=='1' or d.count('1')<2 else 'DEAD')