Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given an integer n represented as a string, return the smallest good base of n.
We call k >= 2 a good base of n, if all digits of n base k are 1's.
 
Please complete the following python code precisely:
```python
class Solution:
    def smallestGoodBase(self, n: str) -> str:
```