Types: N: int, M: int, A: int, grid: List[str]
Ranges: 2 ≤ N, M ≤ 100, 0 ≤ A ≤ 10
Addtl Info: grid[i][j] in {'#', '.', 'S', 'G'}