#include int main(void) { int D1 ,D2,D3,D4, count = 0; scanf("%d,%d,%d,%d",&D1,&D2,&D3,&D4); if(D1 == 0){ count = count + 1; } if(D2 == 0){ count = count + 1; } if(D3 == 0){ count = count + 1; } if(D4 == 0){ count = count + 1; } if(D1 == 1 ||D2 == 1 || D3 == 1 || D4 ==1){ printf("SURVIVED\n"); }else if(count >=2){ printf("DEAD\n"); } else{ printf("SURVIVED\n"); } return 0; }