def cdr(cns):
    """
    Given an object cns created by cons, retrieve the second element.
    :param cns: the function created by cons
    :return: the second element

    >>> cdr(cons(1, 2))
    2
    >>> cdr(cons(cons(3, 4), 5))
    5
    >>> cdr(cdr(cons(6, cons(7, 8))))
    8
    """
    return cns(lambda a, b: b)