Easy C++ solution || Beats 100%
\n\n# Code\n\nclass Solution {\npublic:\n    string strWithout3a3b(int a, int b) {\n        string ans;\n        int n = a + b;\n        int i = 0, acount = 0, 
\n\n# Code\n```\nclass Solution {\npublic:\n    string strWithout3a3b(int a, int b) {\n        string ans;\n        int n = a + b;\n        int i = 0, acount = 0, bcount = 0;\n        while(i < n){\n            if(b > a){\n                if(bcount < 2 && b > 0){\n                    ans.push_back(\'b\');\n                    b--; bcount++;\n                    acount = 0;\n                }   \n                else if(a > 0 && acount < 2){\n                    ans.push_back(\'a\');\n                    a--; acount++;\n                    bcount = 0;\n                }\n                i++;\n            }\n\n            else{\n                if(a > 0 && acount < 2){\n                    ans.push_back(\'a\');\n                    a--; acount++;\n                    bcount = 0;\n                }\n                else if(bcount < 2 && b > 0){\n                    ans.push_back(\'b\');\n                    b--; bcount++;\n                    acount = 0;\n                }\n                i++;\n            }\n        }\n\n        return ans;\n    }\n};\n```
['String', 'Greedy', 'C++']