An array of n+1 non-negative integers was encoded into an array of length n where encoded[i] equals original[i] XOR original[i+1]. Given the encoded array and the first original element, reconstruct and return the original array.
Input: A JSON object {"encoded": [<integers>], "first": <integer>}.
Output: Return the reconstructed original array of length len(encoded) + 1.
Input: {"encoded":[1,2,3],"first":1}
Output: [1,0,2,1]
Explanation: Chaining XORs gives [1,0,2,1].Input: {"encoded":[6,2,7,3],"first":4}
Output: [4,2,0,7,4]
Explanation: Rebuilding step by step from 4.1 <= len(encoded) <= 10^50 <= encoded[i], first <= 10^5