'Returns the ``n``-th coefficient of ``f`` where ``N`` are the
exponents of the generators in the term of interest.
Examples
>>> from sympy import Poly, sqrt
>>> from sympy.abc import x, y
>>> Poly(x**3 + 2*x**2 + 3*x, x).nth(2)
2
>>> Poly(x**3 + 2*x*y**2 + y**2, x, y).nth(1, 2)
2
>>> Poly(4*sqrt(x)*y)
Poly(4*y*(sqrt(x)), y, sqrt(x), domain=\'ZZ\')
>>> _.nth(1, 1)
4
See Also
coeff_monomial'

def nth(f, *N):

    if hasattr(f.rep, 'nth'):
        if (len(N) != len(f.gens)):
            raise ValueError('exponent    of    each    generator    must    be    specified')
        result = f.rep.nth(*list(map(int, N)))
    else:
        raise OperationNotSupported(f, 'nth')
    return f.rep.dom.to_sympy(result)
