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

Given an initial array arr, every day you produce a new array using the array of the previous day.
On the i-th day, you do the following operations on the array of day i-1 to produce the array of day i:

If an element is smaller than both its left neighbor and its right neighbor, then this element is incremented.
If an element is bigger than both its left neighbor and its right neighbor, then this element is decremented.
The first and last elements never change.

After some days, the array does not change. Return that final array.
 
Please complete the following python code precisely:
```python
class Solution:
    def transformArray(self, arr: List[int]) -> List[int]:
```