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