Library for the Rankmaniac competition.