Easy Solution
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```\nclass FrontMiddleBackQueue:\n\n    def __init__(self):\n        self.queue=[]\n        \n\n    def pushFront(self, val: int) -> None:\n        self.queue.insert(0,val)\n        \n\n    def pushMiddle(self, val: int) -> None:\n        leng=len(self.queue)\n        mid=leng//2\n        \n        self.queue.insert(mid,val)\n        \n\n    def pushBack(self, val: int) -> None:\n        self.queue.append(val)\n        \n\n    def popFront(self) -> int:\n     \n        if(len(self.queue)==0):\n            return(-1)\n        \n        return(self.queue.pop(0))\n        \n\n    def popMiddle(self) -> int:\n        if(len(self.queue)==0):\n            return(-1)\n\n        leng=len(self.queue)\n        mid=leng//2\n        if(leng%2!=0):\n            \n            return(self.queue.pop(mid))\n        else:\n            return(self.queue.pop(mid-1))\n\n        \n\n    def popBack(self) -> int:\n        if(len(self.queue)==0):\n            return(-1)\n        return(self.queue.pop(-1))\n        \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()\n```
['Array', 'Python3']