Python Code, using Deque.
\nfrom collections import deque \nclass FrontMiddleBackQueue:\n\n    def __init__(self):\n        self.l=[]\n\n    def pushFront(self, val: int) -> None:\n     
```\nfrom collections import deque \nclass FrontMiddleBackQueue:\n\n    def __init__(self):\n        self.l=[]\n\n    def pushFront(self, val: int) -> None:\n        self.l.insert(0,val)\n\n    def pushMiddle(self, val: int) -> None:\n        a=len(self.l)//2\n        self.l.insert(a,val)\n\n    def pushBack(self, val: int) -> None:\n        self.l.append(val)\n\n    def popFront(self) -> int:\n        if len(self.l)==0:\n            return -1\n        return self.l.pop(0)\n\n    def popMiddle(self) -> int:\n        \n        if len(self.l)==0:\n            return -1\n        if len(self.l)%2==0:\n            a=len(self.l)//2\n            a=a-1\n            x=self.l[a]\n            self.l=self.l[:a]+self.l[a+1:]\n            print(self.l)\n            return x\n        else:\n            a=len(self.l)//2\n            \n            x=self.l[a]\n            self.l=self.l[:a]+self.l[a+1:]\n            print(self.l)\n            return x\n        \n        \n    def popBack(self) -> int:\n        if len(self.l)==0:\n            return -1\n        return self.l.pop()\n\n\n# Your FrontMiddleBackQueue object will be instantiated and called as such:\n# obj = FrontMiddleBackQueue()\n# obj.pushFront(val)\n# obj.pushMiddle(val)\n# obj.pushBack(val)\n# param_4 = obj.popFront()\n# param_5 = obj.popMiddle()\n# param_6 = obj.popBack()```
[]