flag = list(map(int, input().split())) death = sum(flag[:3]) alive = flag[-1] if alive or death < 2: print("SURVIVED") else: print("DEAD")