a=*$<;print (i=1+a.sort.reverse.index(a[0])),%w[th rd nd st][3.0/i]