Data source: http://rosettacode.org/wiki/Dinesman's_multiple-dwelling_problem