def front_ptr(queue):
    return head(queue)

def rear_ptr(queue):
    return tail(queue)

def set_front_ptr(queue, item):
    set_head(queue, item)

def set_rear_ptr(queue, item):
    set_tail(queue, item)

q = pair(1, 2)
set_front_ptr(q, 42)
print(front_ptr(q))

# expected: 42
