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