✅simple iterative solution || python
\n# Code\n\nclass Solution:\n\n    def check(self,s):\n        i=0\n        j=len(s)-1\n        if(s[i]==\'(\'):i+=1\n        elif(s[j]==\')\'):j-=1\n        s=
\n# Code\n```\nclass Solution:\n\n    def check(self,s):\n        i=0\n        j=len(s)-1\n        if(s[i]==\'(\'):i+=1\n        elif(s[j]==\')\'):j-=1\n        s=s[i:j+1]\n        k=s.find(".")\n        if(k!=-1):\n            if(1<k and s[0]==\'0\'):return 0 \n            if(s[len(s)-1]==\'0\'):return 0\n            return 1\n        elif( str(int(s))==s):return 1 \n        return 0\n\n\n    def ambiguousCoordinates(self, s: str) -> List[str]:\n        l=[]\n        for i in range(1,len(s)-2):\n            fp=s[:i+1]\n            sp=s[i+1:]\n            fl=[]\n            sl=[]\n            if((self.check(fp))):fl.append(fp)\n            if((self.check(sp))):sl.append(sp)\n            for j in range(1,len(fp)-1):\n                temp=fp[:j+1]+"."+fp[j+1:]\n                if((self.check(temp))):fl.append(temp)\n            for j in range(0,len(sp)-2):\n                temp=sp[:j+1]+"."+sp[j+1:]\n                if((self.check(temp))):sl.append(temp)\n            for j in fl:\n                for k in sl:\n                    l.append(j+", "+k)\n\n        n=len(l)\n        return l\n```
['String', 'Python3']