[SUBS]RANK

New version of problem 237