Sort priorities in ascending order