Carton Sorting and Palletizing System