Finding tetration in a multiplicative group modulo p
As pointed out in the comments, it's not quite clear what the problem is, but here's an easy algorithm for the (arguably) most natural interpretation.

Given any prime $p$ and integer $a$, the following procedure finds an integer $x\in\mathbb Z_{\geq0}$ such that
$$ x^x\equiv a\pmod p \,\text. $$




Pick some positive integer $e$ coprime to $p-1$. (For example, $e=1$ always works.)
Write the prospective solution as $x=e+k(p{-}1)$ with $k\in\mathbb Z_{\geq0}$.
Since the order of $x$ must be a divisor of $p-1$, the equation becomes
$$(e+k(p{-}1))^{e}\bmod p=a \,\text. $$
Raise everything to the power of $f:=e^{-1}\bmod(p{-}1)$ to obtain
$$ e+k(p{-}1) \equiv a^f \pmod p \,\text. $$
Simply solve this congruence for $k$, that is, compute
$$ k := (e-a^f)\bmod p \,\text. $$
Output $x:=e+k(p{-}1)$.




Note that the expected size of $x$ is approximately $p^2$.