for(p=a=[];$=readline();)a[p++]=[2e5-/\d+$/($),p,$] for([i,[k,,v]]in a.sort())print(a[k]=a[k]||++i,v)
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page