Easy C++ Solution
\n\n# Code\n\nclass Solution {\npublic:\n   vector<string>res;\n   vector<string>putdot(string s){\n       vector<string>temp;\n       temp.push_back(s);\n     
\n\n# Code\n```\nclass Solution {\npublic:\n   vector<string>res;\n   vector<string>putdot(string s){\n       vector<string>temp;\n       temp.push_back(s);\n       for(int i=1;i<s.length();i++){\n           temp.push_back(s.substr(0,i)+"."+s.substr(i));\n       }\n       return temp;\n   }\n bool isValid(string s) {\n    if (s.find(\'.\') != string::npos) {\n        size_t dotPosition = s.find(\'.\');\n        string integerPart = s.substr(0, dotPosition);\n        string decimalPart = s.substr(dotPosition + 1);\n\n        if (integerPart != "0" && integerPart[0] == \'0\') {\n            return false;\n        } else {\n            return !decimalPart.ends_with("0");\n        }\n    } else {\n        if (s == "0") {\n            return true;\n        } else {\n            return !s.starts_with("0");\n        }\n    }\n}\n    void helper(string s1,string s2){\n        vector<string>v1=putdot(s1);\n        vector<string>v2=putdot(s2);\n        for(string &a:v1){\n            if(isValid(a)){\n                for(string &b:v2){\n                    if(isValid(b)){\n                        res.push_back("("+a+", "+b+")");\n                    }\n                }\n            }\n        }\n    }\n\n    vector<string> ambiguousCoordinates(string s) {\n        string s2=s.substr(1,s.length()-2);\n        for(int i=1;i<s2.length();i++){\n            helper(s2.substr(0,i),s2.substr(i));\n        }\n        return res;\n    }\n};\n\n```
['C++']