Easy IF ELSE
IntuitionApproachComplexity
Time complexity:O(N)

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

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

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

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

# Code
```java []
class Solution {
    public String strWithout3a3b(int a, int b) {
        String ans="";
        int ac=0;
        int bc=0;
        while(a>0 || b>0)
        {
            if(a>b && ac<2)
            {
                ans+='a';
                ac++;
                a--;
                bc=0;
            }
           else if(b>a && bc<2)
            {
                ans+='b';
                bc++;
                b--;
                ac=0;
            }
            else if(ac==0 && a>0)
            {
                ans+='a';
                ac++;
                bc=0;
                a--;
            }
            else{
                ans+='b';
                bc++;
                ac=0;
                b--;
            }
        }
        return ans;
    }
}
```
['Java']