fn xcount(s: &Vec) -> usize { s.iter().filter(|c| **c == 'x').count() } fn main() { let mut s1 = String::new(); std::io::stdin().read_line(&mut s1).ok(); let s1: Vec = s1.trim().chars().collect(); let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut s2 = String::new(); std::io::stdin().read_line(&mut s2).ok(); let s2: Vec = s2.trim().chars().collect(); if xcount(&s1) != xcount(&s2) { println!("SUCCESS"); } else if n == 1 { if (xcount(&s1) == 1 || xcount(&s1) == 2) && (s1[0] == s2[2] || s1[2] == s2[0]) { println!("SUCCESS"); } else { println!("FAILURE"); } } else { println!("FAILURE"); } }