a=$<.map &:hex;print (i=1+a.sort.reverse.index(a[0])),"stndrd#{'th'*97}"[i-1,2]