Not a good description of the problem.

Are the elements in the same box identical?

If not how many of each kind?

Can two boxes have any common elements?

If so, how many?

I really think that you should try to rewrite the to make all the condition on the boxes and on the elements as clear as possible.