C++ Solution Using Vectors
\nclass FrontMiddleBackQueue {\npublic:\n    vector<int> vec;\n    FrontMiddleBackQueue() {\n    }\n    \n    void pushFront(int val) {\n        vec.insert(vec.
```\nclass FrontMiddleBackQueue {\npublic:\n    vector<int> vec;\n    FrontMiddleBackQueue() {\n    }\n    \n    void pushFront(int val) {\n        vec.insert(vec.begin(),val);\n    }\n    \n    void pushMiddle(int val) {\n        vec.insert(vec.begin()+vec.size()/2,val);\n    }\n    \n    void pushBack(int val) {\n        vec.push_back(val);\n    }\n    \n    int popFront() {\n        if(vec.size() == 0)\n            return -1;\n        int value = vec[0];\n        vec.erase(vec.begin());\n        return value;\n    }\n    \n    int popMiddle() {\n        if(vec.size() == 0)\n            return -1;\n        int value = vec[(vec.size()-1)/2];\n        vec.erase(vec.begin()+(vec.size()-1)/2);\n        return value;\n    }\n    int popBack() {\n        if(vec.size() == 0)\n            return -1;\n        int value = vec[vec.size() -1];\n        vec.pop_back();\n        return value; \n    }\n};\n\n/**\n * Your FrontMiddleBackQueue object will be instantiated and called as such:\n * FrontMiddleBackQueue* obj = new FrontMiddleBackQueue();\n * obj->pushFront(val);\n * obj->pushMiddle(val);\n * obj->pushBack(val);\n * int param_4 = obj->popFront();\n * int param_5 = obj->popMiddle();\n * int param_6 = obj->popBack();\n */\n```
[]