fn main() { let mut input = String::new(); std::io::Read::read_to_string(&mut std::io::stdin(), &mut input).ok(); let input: Vec = input .split_whitespace() .map(|n| n.parse().unwrap()) .collect(); let h = input[0]; let mut hh = input[2..].to_vec(); hh.sort_unstable(); hh.reverse(); match hh.iter().position(|&h_| h_ < h).or(Some(hh.len())) { Some(0) => println!("1st"), Some(1) => println!("2nd"), Some(2) => println!("3rd"), Some(n) => println!("{}th", n + 1), _ => unreachable!(), } }