Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given an integer array pref of size n. Find and return the array arr of size n that satisfies:

pref[i] = arr[0] ^ arr[1] ^ ... ^ arr[i].

Note that ^ denotes the bitwise-xor operation.
It can be proven that the answer is unique.
 
Please complete the following python code precisely:
```python
class Solution:
    def findArray(self, pref: List[int]) -> List[int]:
```