Ilkka Törmä has already given the answer that $f$ is an idempotent function.
You might want to be aware of the concept of
A point $c$ is a fixed-point for $f$ if $f(c) = c$, and hence
$$f(f(c)) = f(c) = c.$$
A set of fixed-points is often called a fixed set.
In your scenario, the output of $f$, or
image of $f$, is
a fixed set itself.