设 $n(n \geqslant 3)$ 阶矩阵
$$
A =\left(\begin{array}{ccccc}
1 & a & a & \cdots & a \\
a & 1 & a & \cdots & a \\
a & a & 1 & \cdots & a \\
\vdots & \vdots & \vdots & & \vdots \\
a & a & a & \cdots & 1
\end{array}\right),
$$
若矩阵 $A$ 的秩为 $n-1$, 则 $a$ 必为
A. 1.
B. $\frac{1}{1-n}$.
C. -1 .
D. $\frac{1}{n-1}$.