  Let $(\Sigma, \sigma)$ be the one-sided shift space with $m$ symbols and
$R_n(x)$ be the first return time of $x\in\Sigma$ to the $n$-th cylinder
containing $x$. Denote $$E^\varphi_{\alpha,\beta}=\left\{x\in\Sigma:
\liminf_{n\to\infty}\frac{\log R_n(x)}{\varphi(n)}=\alpha,\
\limsup_{n\to\infty}\frac{\log R_n(x)}{\varphi(n)}=\beta\right\},$$ where
$\varphi: \mathbb{N}\to \mathbb{R}^+$ is a monotonically increasing function
and $0\leq\alpha\leq\beta\leq +\infty$. We show that the Hausdorff dimension of
the set $E^\varphi_{\alpha,\beta}$ admits a dichotomy: it is either zero or one
depending on $\varphi, \alpha$ and $\beta$.
