A deque is a double-ended queue that allows enqueue and dequeue operations from both the ends. Given a deque and q queries. The task is to perform some operation on dequeue according to the queries as ...