python
class Solution:
def decode(self, encoded: List[int], first: int) -> List[int]:
arr = []
arr.append(first)
for i in range(1,len(encoded)+1):
arr.append(encoded[i-1]^first)
first = arr[i]
return arr