use std::io::*; use std::str::*; fn readw(s: &mut R) -> Option { let s = s.bytes().map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect::(); if s.is_empty() { None } else { s.parse::().ok() } } fn read(s: &mut R) -> T { readw(s).unwrap_or_else(|| std::process::exit(0)) } fn main() { let s = stdin(); let s = s.lock(); let s = &mut BufReader::new(s); loop { let (a, b, c): (u32, u32, u32) = (read(s), read(s), read(s)); let mut v = [(a, 'A'), (b, 'B'), (c, 'C')]; v.sort(); v.reverse(); for &x in &v { println!("{}", x.1); } } }