Merge equal characters
\nclass DSU:\n    def __init__(self, n):\n        self.parent = list(range(n))\n        self.size = [1] * n\n        \n    def find(self, a):\n        if a == s
```\nclass DSU:\n    def __init__(self, n):\n        self.parent = list(range(n))\n        self.size = [1] * n\n        \n    def find(self, a):\n        if a == self.parent[a]:\n            return a\n        self.parent[a] = self.find(self.parent[a])\n        return self.parent[a]\n        \n    def union(self, a, b):\n        parent_a = self.find(a)\n        parent_b = self.find(b)\n        if parent_a != parent_b:\n            if self.size[parent_a] < self.size[parent_b]:\n                parent_a, parent_b = parent_b, parent_a\n            self.parent[parent_b] = parent_a\n            self.size[parent_a] += self.size[parent_b]\n\nclass Solution:\n    def findTheString(self, lcp: List[List[int]]) -> str:\n        n = len(lcp)\n        dsu = DSU(n)\n        for i in range(n):\n            for j in range(n):\n                if lcp[i][j] > 0:\n                    dsu.union(i, j)\n        res = []\n        x = 0\n        mp = {}\n        for i in range(n):\n            if dsu.find(i) not in mp:\n                if x >= 26:\n                    return ""\n                mp[dsu.find(i)] = chr(ord(\'a\') + x)\n                x += 1\n            res.append(mp[dsu.find(i)])\n        res = "".join(res)\n        for i in range(n):\n            for j in range(n):\n                curr = 1 + lcp[i + 1][j + 1] if i + 1 < n and j + 1 < n else 1\n                if res[i] != res[j]:\n                    curr = 0\n                if curr != lcp[i][j]:\n                    return ""\n        return res\n```
['Python']