Uses permutations in order to determine how far along the current space
could go in range 0 to 9 (inclusive). Then it moves to the next space and
does the same thing. At the end, it assigns the numbers based on how far
along it could go.