<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Implement a queue following the classic FIFO (First-in-first-out) principle using Python.
<|im_end|>
<|im_start|>assistant
class Queue:
    def __init__(self):
        self.queue = []

    def enqueue(self, val):
        self.queue.append(val)

    def dequeue(self):
        if self.queue:
            return self.queue.pop(0)
        else:
            return None

    def peek(self):
        if self.queue:
            return self.queue[0]
        else:
            return None<|im_end|>
