Sort:  

Thanks, @smuggly-sparrow! This one was pretty hard to write = )