Prove that the function
$$ G(z) = \mathcal{H}(z) \, || \, \text{LSB}(z) $$
(where $\mathcal{H}$ is a collision resistant hash function, $||$ is concatenation and $\text{LBS}$ is the least significant bit of $z$) is not preimage resistant.
Obviously, if $z = 0^n$ then from the output $G(z)$, one can extract $z$ from the last bit. That also can be said about the case $z = 1^n$.
But is this enough to prove $G$ is not preimage resistant?
Pre-image resistance: given a hash $h$ it should be hard to find any message $m$ such that $h=hash(m)$. This concept is related to that of the one-way function. Functions that lack this property are vulnerable to pre-image attacks.