Solution
enqueue() (in Python examples, put()) adds an item to the back of the queue.
dequeue() (in Python examples, get()) removes an item from the front of the queue.
Enqueue grows the line from the end; dequeue serves the person who has been waiting the longest.