[SUBS]RANK

Problem 241 on a Very Special Day