Python3 simple solution by two approaches
This approach may be wrong but it clears all test cases\n\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n      
This approach may be wrong but it clears all test cases\n```\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        s = \'\'.join(map(str, arr))\n        for i in pieces:\n            if \'\'.join(map(str, i)) not in s or not i[0] in arr:\n                return False\n        return True\n```\n\n```\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        for i in pieces:\n            if i[0] not in arr:\n                return False\n        pieces.sort(key=lambda a:arr.index(a[0]))\n        res = []\n        for i in pieces:\n            res += i\n        return True if res == arr else False\n```\n**If you like the solution, please vote for this**
['Python3']