#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main() { int a, b, c, s; cin >> a >> b >> c >> s; if (s == 1) { cout << "SURVIVED" << endl; return 0; } if (a + b + c >= 2) { cout << "DEAD" << endl; } else { cout << "SURVIVED" << endl; } }