Sorting Algorithm of Tropes