Source code:
@Grab(group='org.openscience.cdk', module='cdk-bundle', version='2.9')
import org.openscience.cdk.config.*;
isofac = Isotopes.getInstance();
uranium = 92;
for (atomicNumber in 1..uranium) {
element = isofac.getElement(atomicNumber)
}
Output: