greedy use character and test string
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public String findTheString(int[][] lcp) {\n        int n = lcp.length;\n        int index = 0;\n        Character[] str = new Character[n];\n        for(int i = 0;i<n;i++){\n\n            if(lcp[i][i]!=n-i)\n                return "";\n\n            if(str[i]==null){\n                if(index>25)\n                    return "";\n                str[i] = (char)(\'a\'+index++);\n            }\n            \n            for(int j = 0;j<n;j++){\n                if(lcp[i][j]>n-i||lcp[i][j]>n-j)\n                    return "";\n                if(lcp[i][j]>0){\n                    if(str[j]!=null&&str[j]!=str[i])\n                        return "";\n                    str[j] = str[i];\n                }else if(lcp[i][j]==0&&str[i]==str[j]){\n                    return "";\n                }\n            }\n        }\n        StringBuilder sb = new StringBuilder();\n        for(int i = 0;i<str.length;i++){\n            sb.append(str[i]);\n        }\n        \n        \n        for(int i = 0;i<n;i++){\n            for(int j = i+1;j<n;j++){\n                if(lcp[i][j]==0)\n                    continue;\n                int count = 0;\n                int k = 0;\n                while(i+k<n&&j+k<n&&sb.charAt(i+k)==sb.charAt(j+k)){\n                    count++;\n                    k++;\n                }\n                if(count!=lcp[i][j])\n                    return "";\n            }\n        }\n        \n        return sb.toString();\n    }\n}\n```
['Java']