I am trying to revamp the producer consumer code below to be similar to this:

Producer produces 3 items (strings: food)
There are 3 Consumers (3 threads) each thread can only pull out 2 of a specific food.
Example: Foods = [Apple, Orange, Banana]
Consumer_1 can take out Apple and Banana only
Consumer_2 can take out Apple and Orange only
Etc.