Consider the following fragment of code:
my_deque = collections.deque()
my_deque.append(1)
my_deque.appendleft(2)
my_deque.append(3)
print(my_deque.pop())
my_deque.appendleft(4)
print(my_deque.pop())
print(my_deque.popleft())
In which order will the elements be printed out?