Cat and Dog
Sort the stack