L = input() print(['DEAD', 'SURVIVED'][L[-1] == '1' or L.count('1') < 2])