Java 1-Line Clean && Fast
\nprivate final List<Integer> queue;\n\n    public FrontMiddleBackQueue() {\n        queue = new ArrayList<>();\n    }\n\n    public void pushFront(int val) {\n
```\nprivate final List<Integer> queue;\n\n    public FrontMiddleBackQueue() {\n        queue = new ArrayList<>();\n    }\n\n    public void pushFront(int val) {\n        queue.add(0, val);\n    }\n\n    public void pushMiddle(int val) {\n        queue.add(queue.size() / 2, val);\n    }\n\n    public void pushBack(int val) {\n        queue.add(val);\n    }\n\n    public int popFront() {\n        return queue.isEmpty() ? -1 : queue.remove(0);\n    }\n\n    public int popMiddle() {\n        return queue.isEmpty() ? -1 : queue.remove((queue.size() - 1) / 2);\n    }\n\n    public int popBack() {\n        return queue.isEmpty() ? -1 : queue.remove(queue.size() - 1);\n    }\n```
['Java']