String Without AAA or BBB-Easy Python solution beats 96%
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python []
class Solution(object):
    def strWithout3a3b(self, a, b):
        """
        :type a: int
        :type b: int
        :rtype: str
        """
        s=''
        while a>0 and b>0:
            if a==b:
                s=s+'a'*1+'b'*1
                a=a-1
                b=b-1
            elif a>b:
                s=s+'a'*2+'b'*1
                a=a-2
                b=b-1
            else:
                s=s+'b'*2+'a'*1
                a=a-1
                b=b-2
        if a>0:
            s=s+'a'*a
        elif b>0:
            s=s+'b'*b
        
        return s
        
        
```
['String', 'Greedy', 'Python', 'Python3']