Reuse of greywater

Hi Sir,

I want to reuse greywater for flushing tank at appartment with four floors and 16 flats. Want to use wastewater from bathroom, washing machine and kitchen for flushing in toilets. What steps to be taken. Please give me your valuable information and necessary suggestions.