#include <iostream>
int main() {
    int D[3];
    int S;
    for(int i = 0;i < 3;i++){
        std::cin >> D[i];
    }
    std::cin >> S;
    
    int DEAD = 0;
    for(int i = 0;i < 3;i++){
        if(D[i] == 1)DEAD++;
    }
    
    if(DEAD >= 2){
        if(S == 1){
            std::cout << "SURVIVED" << std::endl;
        }
        else if(S == 0){
            std::cout << "DEAD" << std::endl;
        }
    }
    else if(DEAD < 2)std::cout << "SURVIVED" << std::endl;
    return 0;
}