Let $f(x)$ and $g(x)$ denote two independent, “ideal”, unkeyed, public $n$-bit permutations (two publicly known bijective functions that produce $n$-bit outputs from $n$-bit inputs), where $n$ is an arbitrary natural number greater than or equal to $3$ (the number $3$ is here because it is the minimal size of a “cryptographically significant” S-Box).
Does there exist an efficient iterative algorithm (based on $f(x)$ and $g(x)$ as the underlying functions) that allows to construct a cryptographically secure $n$-bit hash function for $k$-bit inputs, assuming that $k$ is an arbitrary natural number greater than or equal to zero (that is, there should be no limit on the maximum length of the input)?