Construction of $g:\mathbb{N}\rightarrow\mathbb{N}$ surjective, such that $g^{-1}(n)=\infty,\;\forall n\in\mathbb{N}$

Consider a bijection $f : \mathbb{N} \rightarrow \mathbb{N}^2$, and consider the function $h : \mathbb{N}^2 \rightarrow \mathbb{N}$ defined for every $(x,y) \in \mathbb{N}^2$ by $$h(x,y)=x$$

Then, $g : =h \circ f$ should do the job.