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

You are given an integer num. You will apply the following steps exactly two times:

Pick a digit x (0 <= x <= 9).
Pick another digit y (0 <= y <= 9). The digit y can be equal to x.
Replace all the occurrences of x in the decimal representation of num by y.
The new integer cannot have any leading zeros, also the new integer cannot be 0.

Let a and b be the results of applying the operations to num the first and second times, respectively.
Return the max difference between a and b.
 
Please complete the following python code precisely:
```python
class Solution:
    def maxDiff(self, num: int) -> int:
```