Python

class Queue:

    def __init__(self):
        self.data = []

    def enqueue(self, element):
        self.data.append(element)

    def dequeue(self):
        return self.data.pop(0)

    def read(self):
        return self.data[0]


queue = Queue()
queue.enqueue(1)
assert queue.read() == 1
queue.enqueue(2)
assert queue.read() == 1
queue.enqueue(3)
assert queue.read() == 1

assert queue.dequeue() == 1
assert len(queue.data) == 2
assert queue.dequeue() == 2
assert len(queue.data) == 1
assert queue.dequeue() == 3
assert len(queue.data) == 0