#include using namespace std; int main() { string y = "SURVIVED", n = "DEAD"; unsigned short a, b, c, s; cin >> a >> b >> c >> s; unsigned short t = a + (b<<1) + (c<<2); if (s&1 || __builtin_popcount(t) < 2) { cout << y << endl; } else { cout << n << endl; } return 0; }