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

You are given two integers m and n. Consider an m x n grid where each cell is initially white. You can paint each cell red, green, or blue. All cells must be painted.
Return the number of ways to color the grid with no two adjacent cells having the same color. Since the answer can be very large, return it modulo 109 + 7.
 
Please complete the following python code precisely:
```python
class Solution:
    def colorTheGrid(self, m: int, n: int) -> int:
```