use std::io; use std::str::FromStr; fn main() { let stdin = io::stdin(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let mut it = buf.split_whitespace().map(|n| usize::from_str(n).unwrap()); let n = it.next().unwrap(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let sa: Vec<&str> = buf.split_whitespace().collect(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let sb: Vec<&str> = buf.split_whitespace().collect(); // println!("{:?}", sa); // println!("{:?}", sb); for i in 0..n { if sa[i] != sb[i] { println!("{}", i + 1); println!("{}", sa[i]); println!("{}", sb[i]); return; } } }