input

introduced a test to prevent the user entering a negative integer or
anything that isn't an integer as the number of generators of the
subgroup.