Sort:  

That is the simple logic.