# https://leetcode.com/problems/decode-xored-array/
from typing import List

class Solution:
    def decode(self, encoded: List[int], first: int) -> List[int]:
        r = [first]
        now = first
        for i in encoded:
            now = now ^ i
            r.append(now)
        return r

print(Solution().decode([6,2,7,3], 4))
e5e74b3f5afdbffc1c3f4b83988d9fed59b0b23e
<mask token>

<mask token>


class Solution:

    def decode(self, encoded: List[int], first: int) ->List[int]:
        r = [first]
        now = first
        for i in encoded:
            now = now ^ i
            r.append(now)
        return r


<mask token>

<mask token>


class Solution:

    def decode(self, encoded: List[int], first: int) ->List[int]:
        r = [first]
        now = first
        for i in encoded:
            now = now ^ i
            r.append(now)
        return r


print(Solution().decode([6, 2, 7, 3], 4))

from typing import List


class Solution:

    def decode(self, encoded: List[int], first: int) ->List[int]:
        r = [first]
        now = first
        for i in encoded:
            now = now ^ i
            r.append(now)
        return r


print(Solution().decode([6, 2, 7, 3], 4))

# https://leetcode.com/problems/decode-xored-array/
from typing import List

class Solution:
    def decode(self, encoded: List[int], first: int) -> List[int]:
        r = [first]
        now = first
        for i in encoded:
            now = now ^ i
            r.append(now)
        return r

print(Solution().decode([6,2,7,3], 4))