Family Placement

Trying to figure out the code to place families on the following pattern?