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

Write an algorithm to print all ways of arranging n queens on an n x n chess board so that none of them share the same row, column, or diagonal. In this case, "diagonal" means all diagonals, not just the two that bisect the board.
Notes: This problem is a generalization of the original one in the book.
Please complete the following python code precisely:
```python
class Solution:
    def solveNQueens(self, n: int) -> List[List[str]]:
```