# Your code here! def suf(cnt) return 'st' if cnt == 1 return 'nd' if cnt == 2 return 'rd' if cnt == 3 'th' end h, n = gets.chomp.split.map(&:to_i) cnt = 1 n -= 1 n.times do i = gets.chomp.to_i cnt += 1 if h < i end puts "#{cnt}#{suf(cnt)}"