Give nodes consecutive integer labels