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

You are given two strings a and b that consist of lowercase letters. In one operation, you can change any character in a or b to any lowercase letter.
Your goal is to satisfy one of the following three conditions:

Every letter in a is strictly less than every letter in b in the alphabet.
Every letter in b is strictly less than every letter in a in the alphabet.
Both a and b consist of only one distinct letter.

Return the minimum number of operations needed to achieve your goal.
 
Please complete the following python code precisely:
```python
class Solution:
    def minCharacters(self, a: str, b: str) -> int:
```