各得其所

Idiom

 * 1) everyone gets what he or she needs
 * 2) everyone or everything receives a suitable arrangement; each in his proper place