[Java] ArrayList worked looking at the constraints
```\nclass FrontMiddleBackQueue {\n    List list;\n    public FrontMiddleBackQueue() {\n        list = new ArrayList<>();\n    }\n    \n    public void pushFron
```\nclass FrontMiddleBackQueue {\n    List<Integer> list;\n    public FrontMiddleBackQueue() {\n        list = new ArrayList<>();\n    }\n    \n    public void pushFront(int val) {\n        if(list.size() == 0) list.add(val);\n        else list.add(0, val);\n    }\n    \n    public void pushMiddle(int val) {\n        int x = list.size() / 2;\n        list.add(x, val);\n    }\n    \n    public void pushBack(int val) {\n        list.add(val);\n    }\n    \n    public int popFront() {\n        if(list.size() == 0) return -1;\n        return list.remove(0);\n    }\n    \n    public int popMiddle() {\n        return list.size() == 0 ? - 1 : (list.size() % 2 == 0 ? list.remove(list.size() / 2 - 1) : list.remove(list.size() / 2));\n    }\n    \n    public int popBack() {\n        return list.size() == 0 ? -1 : list.remove(list.size() - 1);\n    }\n}
[]