2. Let $a_{1}, a_{2}, \ldots, a_{n}$ be positive consecutive terms of a geometric progression. If the sums

$$
S=a_{1}+a_{2}+\ldots+a_{n} \quad \text { and } \quad T=\frac{1}{a_{1}}+\frac{1}{a_{2}}+\ldots+\frac{1}{a_{n}}
$$

are known, express the product $a_{1} a_{2} \ldots a_{n}$ in terms of $S, T$ and $n$.