def select(P):
    """
    The normal selection strategy.

    INPUT:

    - ``P`` -- a list of critical pairs

    OUTPUT:

    an element of P

    EXAMPLES::

        sage: from sage.rings.polynomial.toy_d_basis import select
        sage: A.<x,y> = PolynomialRing(ZZ, 2)
        sage: f = -y^2 - y + x^3 + 7*x + 1
        sage: fx = f.derivative(x)
        sage: fy = f.derivative(y)
        sage: G = [f, fx, fy]
        sage: B = set((f1, f2) for f1 in G for f2 in G if f1 != f2)
        sage: select(B)
        (-2*y - 1, 3*x^2 + 7)
    """
    min_d = 2**20
    min_pair = 0, 0
    for fi, fj in sorted(P):
        d = fi.parent().monomial_lcm(fi.lm(), fj.lm()).total_degree()
        if d < min_d:
            min_d = d
            min_pair = fi, fj
    return min_pair