fn main() { let s: String = read(); let mut chars = s.chars(); let mut v: Vec = Vec::new(); for _i in 0..s.len() { v.push(chars.next().unwrap()); } for _i in s.len()..9 { v.push('X'); } let k = "kadomatsu".to_string(); let mut kd = k.chars(); let mut kado: Vec = Vec::new(); for _i in 0..9 { kado.push(kd.next().unwrap()); } let mut ans: String = "Yes" .to_string(); for i in 0..9 { if v[i] != kado[i] { v.insert(i, kado[i]); let x = v.pop().unwrap(); if x != 'X' { ans = "No".to_string(); break; } } } if s.len() == 10 { ans = "No".to_string(); } println!("{}", ans); } fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() }