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

Given a 0-indexed 2D integer matrix grid of size n * m, we define a 0-indexed 2D matrix p of size n * m as the product matrix of grid if the following condition is met:

Each element p[i][j] is calculated as the product of all elements in grid except for the element grid[i][j]. This product is then taken modulo 12345.

Return the product matrix of grid.
 
Please complete the following python code precisely:
```python
class Solution:
    def constructProductMatrix(self, grid: List[List[int]]) -> List[List[int]]:
```