Existence of a special kind of continuous injective function $f\colon A \to \mathbb R$, where $A$ is countable, relating to connectedness Let $A \subseteq \mathbb R$ be a countable set ($A$ induced with usual subspace topology), then does there necessarily exist a continuous injective function $f\colon A \to \mathbb R$ such that for every $a \in A$, there exist a connected subset $S\subseteq \mathbb R$ (with more than one point) such that $\{a\}=f^{-1}(S)$ ?I can prove the existence of such function if continuity is not required; if continuity is also required I am totally stuck. Please help. Thanks in advance

Maybe someone can finish this: It's not hard to show, based on the sort of incomplete proofs we've seen, that every point of $A$ must be a strict local extremum for $f$ (note that an isolated point of $A$ is vacuously a local extremum).
That seems impossible for a continuous function on $\Bbb Q$ ???
If that's not clearly impossible, note that the union of two nowhere dense sets is nowhere dense. So (perhaps replacing $f$ by $-f$) we could obtain a countable set $A\subset (a,b)$ with $A$ dense in $(a,b)$ and a continuous function $g$ defined on $A$ so that every point of $A$ is a strict local maximum. Surely that's impossible?
