Ship all the cans. Choose a box of the same color as the can. The game is over if you run out of space for boxes and the line stops.