To determine this for $13^{33} \pmod{64}$ is easy since $\phi(64)=32$ and $\gcd(64,33)=1$, we have $13^{\phi(64)}=13^{32}\equiv1 \pmod{64}$. This means that
$$13^{33}=13^{31}\cdot13\equiv 13 \equiv1 \pmod{64}$$
But this method don't apply to $3^{18} \pmod{37}$ since $\phi(37)=36>18.$ How can I do this?