Simple python solution
```\nclass Solution:\n    def recoverArray(self, nums: List[int]) -> List[int]:\n        nums.sort()\n        \n        dis = list(set([nums[i] - nums[0] for i 
```\nclass Solution:\n    def recoverArray(self, nums: List[int]) -> List[int]:\n        nums.sort()\n        \n        dis = list(set([nums[i] - nums[0] for i in range(1, len(nums) // 2 + 1) if (nums[i] - nums[0]) % 2 == 0]))\n        rec = OrderedDict()\n        pos = defaultdict(deque)\n\n        res = []\n        \n        for i, num in enumerate(nums):\n            if num not in rec: rec[num] = 1\n            else: rec[num] += 1\n            pos[num].append(i)\n        \n        for d in dis:\n            if d == 0: continue\n            new = rec.copy()\n            fail = False\n\n            for k in rec.keys():\n                if new[k] == 0: continue\n                if k + d not in new or new[k + d] < new[k]:\n                    fail = not fail\n                    break\n                new[k + d] -= new[k]\n                new[k] = 0\n\n            if fail: continue\n\n            visited = set()\n            \n            for i, n in enumerate(nums):\n                if i in visited: continue\n                res.append(n + d // 2)\n                visited.add(pos[n].popleft())\n                visited.add(pos[n + d].popleft())\n            break\n            \n        return res
[]