Cross Number Puzzle

Each answer is the recurring block of digits in the "decimal" expansion of a rational number $\frac{a}{p}$, using $S$ as the base of the number system.