def reachability_table(neighbours):
	"""
	Build a reachability table from a neighbour table.
	"""
	reachable = neighbours.copy()
	for a in reachable:
		for b in reachable:
			if a in reachable[b]: reachable[b].update(reachable[a])
	return reachable