Sort the colored balls in the tubes until all the same colors are together.