Converts integers to lists of digits and back.