C++ short and simple solution
```\nstring strWithout3a3b(int A, int B) {\n        std::string res;\n        \n        while (A && B) {\n            if (A > B) {\n                res += "aab"
```\nstring strWithout3a3b(int A, int B) {\n        std::string res;\n        \n        while (A && B) {\n            if (A > B) {\n                res += "aab";\n                A--;\n            } else if (B > A) {\n                res += "bba";\n                B--;\n            } else {\n                res += "ab";\n            }\n            A--;\n            B--;\n        }\n        while (A--) res += "a";\n        while (B--) res += "b";\n        return res;\n    }
[]