use std::io::{self, BufRead}; fn main() { io::stdin().lock().lines().for_each(|l| { let f = l .unwrap() .split_whitespace() .map(|n| n.parse::().unwrap()) .collect::>(); match &f[0..4] { [1, 1, _, 0] | [1, _, 1, 0] | [_, 1, 1, 0] => println!("DEAD"), _ => println!("SURVIVED"), } }); }