a[99][9],d,c;main(e){while(e=gets(a[c]+1))*a[c++]=atoi(rindex(e,32));for(qsort(a,c,36,"‹D$‹‹T$+Ã");d