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

There is an integer array perm that is a permutation of the first n positive integers, where n is always odd.
It was encoded into another integer array encoded of length n - 1, such that encoded[i] = perm[i] XOR perm[i + 1]. For example, if perm = [1,3,2], then encoded = [2,1].
Given the encoded array, return the original array perm. It is guaranteed that the answer exists and is unique.
 
Please complete the following python code precisely:
```python
class Solution:
    def decode(self, encoded: List[int]) -> List[int]:
```