Clean python solution
Code\n\nclass Solution:\n    def findTheString(self, lcp: List[List[int]]) -> str:\n        res = \'\'\n        if not check_valid_lcp(lcp):\n            return
# Code\n```\nclass Solution:\n    def findTheString(self, lcp: List[List[int]]) -> str:\n        res = \'\'\n        if not check_valid_lcp(lcp):\n            return \'\'\n\n        for i in range(len(lcp)):                \n            exact = set()\n            diff = set()\n            for j in range(i):\n                if lcp[i][j] > 0:\n                    exact.add(res[j])\n                else:\n                    diff.add(res[j])\n            if len(exact) > 1:\n                return \'\'\n            if len(exact) == 1:\n                res += (list(exact)[0])\n                if res[i] in diff:\n                    return \'\'\n            if len(exact) == 0:\n                c = choose_diff_char(diff)\n                if c == \'\':\n                    return \'\'\n                res += c\n\n        return res\n\nalphabet = [chr(i+ ord(\'a\')) for i in range(26)]\ndef choose_diff_char(diff):\n    for c in alphabet:\n        if c not in diff:\n            return c\n    return \'\'\n\ndef check_valid_lcp(lcp):\n    for i in range(len(lcp)):\n        if lcp[i][i] != len(lcp) - i:\n            return False\n        for j in range(i):\n            if lcp[i][j] != lcp[j][i] or lcp[i][j] > len(lcp) - i:\n                return False\n            if i == len(lcp)-1:\n                next_value = 0\n            else:\n                next_value = lcp[i+1][j+1]\n\n            if lcp[i][j] !=0 and lcp[i][j] != next_value+1:\n                return False\n    return True\n\n```
['Python3']