brute force deque solution using python3
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def reinitializePermutation(self, n: int) -> int:\n        arr = []\n        orig = []\n        for i in range(n):\n            orig.append(i)\n        print(orig)\n        for i in range(n):\n            if i % 2 == 0:\n                arr.append(orig[i // 2])\n            elif i % 2 == 1:\n                arr.append(orig[n // 2 + (i - 1) // 2])\n        #print(orig)\n        #print(arr)\n        if orig == arr:\n            return 1\n        res = 1\n        new = deque(arr)\n        orig = deque(orig)\n        while new != orig:\n            pop = n\n            for i in range(n):\n                if i % 2 == 0:\n                    new.append(arr[i // 2])\n                elif i % 2 == 1:\n                    new.append(arr[n // 2 + (i - 1) // 2])\n            res += 1\n            #print(new)\n            while pop > 0:\n                new.popleft()\n                pop -= 1\n            #print(new)\n            arr = new\n        return res\n\n        \n        \n\n        \n\n\n                \n```
['Python3']