Raven Riddle's sorting