[Java] Super Clear Solution
\nclass Solution {\n    private List<String> sub(String s) {\n        if (s.length() == 1) return Collections.singletonList(s);\n\n        List<String> ans = ne
```\nclass Solution {\n    private List<String> sub(String s) {\n        if (s.length() == 1) return Collections.singletonList(s);\n\n        List<String> ans = new ArrayList<>();\n        if (s.charAt(0) != \'0\') {\n            ans.add(s);\n            for (int i = 1; i < s.length() && !s.endsWith("0"); i++) {\n                ans.add(s.substring(0, i) + "." + s.substring(i));\n            }\n        } else if (!s.endsWith("0")) {\n            ans.add(s.substring(0, 1) + "." + s.substring(1));\n        }\n\n        return ans;\n    }\n\n    public List<String> ambiguousCoordinates(String S) {\n        List<String> ans = new ArrayList<>();\n        List<String> left;\n        List<String> right;\n\n        for (int i = 2; i < S.length() - 1; i++) {\n            left = sub(S.substring(1, i));\n            right = sub(S.substring(i, S.length() - 1));\n\n            if (!left.isEmpty() && !right.isEmpty()) {\n                for (String l : left) {\n                    for (String r : right) {\n                        ans.add("(" + l + ", " + r + ")");\n                    }\n                }\n            }\n        }\n\n        return ans;\n    }\n}\n```
[]