fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let c: Vec<_> = s.trim().chars().collect(); let i = if c[0] == c[1] || c[0] == c[2] { c.iter().position(|&x| x != c[0]).unwrap() } else { 0 }; println!("{} {}", i + 1, c[i]) }