a=scan("stdin") b=rev(sort(a)) for(v in a)write(which(b==v)[1],"")