  Suppose that $G$ is a finite $p$-group. If all subgroups of index $p^t$ of
$G$ are abelian and at least one subgroup of index $p^{t-1}$ of $G$ is not
abelian, then $G$ is called an $\mathcal{A}_t$-group. In this paper, some
information about $\mathcal{A}_t$-groups are obtained and
$\mathcal{A}_3$-groups are completely classified. This solves an {\it old
problem} proposed by Berkovich and Janko in their book. Abundant information
about $\mathcal{A}_3$-groups are given.
