fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn main() { let s: String = read(); let st: &str = &s[..]; let l0 = st.chars().nth(0).unwrap(); let l1 = st.chars().nth(1).unwrap(); let l2 = st.chars().nth(2).unwrap(); let l: char; if l0 == l1 { l = l0; } else if l0 == l2 { l = l0; } else { l = l1; } for i in 0..s.len() { let lx = st.chars().nth(i).unwrap(); if lx != l { println!("{} {}", i + 1, lx); break; } } }