fn main() { let mut line = String::new(); std::io::stdin().read_line(&mut line); let (mut e, mut w) = (0, 0); for i in line.chars() { match i { 'O' => e += 1, 'X' => w += 1, _ => break, } if e == 3 { println!("East"); return; } if w == 3 { println!("West"); return; } } println!("NA"); }