Csacademy Fashion problem - Maximum Flow

Hello everyone,

I’m currently learning maximum flows and its techniques, and I’ve decided to practice some problems. However, I am stuck on this one: Fashion Problem.

Does anyone have any insights or ideas on how to solve it? Your help would be greatly appreciated!