fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s = s.trim().chars().collect::>(); if s.len() >= 10 { println!("No"); return; } let target = "kadomatsu".chars().collect::>(); let mut idx = 0usize; for &c in s.iter() { if let Some(i) = (idx..target.len()).filter(|&i| target[i] == c).nth(0) { idx = i+1; } else { println!("No"); return; } } println!("Yes"); }