use std::io; fn main() { let mut buf = String::new(); io::stdin().read_line(&mut buf).ok(); let l: Vec = buf .trim() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect(); let mut found = false; for _i in 0..l[0] { let mut buf = String::new(); io::stdin().read_line(&mut buf).ok(); found = buf .trim() .chars() .collect::>() .windows(4) .any(|c| match c { ['L', 'O', 'V', 'E'] => true, _ => false, }); if found { break; } } if found { println!("YES") } else { println!("NO") } }