Sheafification of the constant presheaf Let $A$ be an abelian group, and $X$ a topological space.
Define the constant sheaf $\mathcal{A}$ on $X$ determined by $A$ as follows: for any open set $U \subset X$, 
$\mathcal{A}(U)=$the group of continuous functions from $U$ to $A$, where $A$ is endowed with the discrete topology; with the usual restrictions we obtain a sheaf.
Moreover, the constant presheaf $\mathcal{F}$ of $A$ is defined by $\mathcal{F}(U)=A$ when $U \neq \emptyset$, again considering the usual restrictions we obtain a presheaf.
I am asked to show that the sheafification of $\mathcal{F}$ is $\mathcal{A}$.For this, I wanted to use the universal property of sheafification, and considered the application $\theta :\mathcal{F} \to \mathcal{A}$, $\theta(U)(a):=s_a$, where $s_a$ is the constant function on $U$, equal to $a$. I managed to show it is a morphism of sheaves. but given a sheaf $\mathcal{G}$ and a morphism $\varphi: \mathcal{F} \to \mathcal{G}$, I'm having trouble finding the unique morphism $\psi :\mathcal{A} \to \mathcal{G}$ s.t. $\psi \theta =\varphi$
 A: Let $\mathcal{F}'$ be the sheaf associated to $\mathcal{F}$ and let $\theta : \mathcal{F} \to \mathcal{F}'$ be the canonical morphism.  Recall that $\theta$ induces an isomorphism between the stalks at every point (Liu, 2.2.14); hence the stalks of $\mathcal{F}'$ are $A$ everywhere.  Now consider the morphism $\phi : \mathcal{F} \to \mathcal {A}$ which sends every element of $A$ to the correaponding constant map.  The universal property of the sheaf associated to $\mathcal{F}$ gives a unique morphism $\psi : \mathcal{F}' \to \mathcal{A}$ through which $\mathcal{F}$ factors.  Prove that this is an isomorphism by showing the induced maps on the stalks are isomorphisms (Liu, 2.2.12).  For surjectivity, consider for any germ $f_x \in \mathcal{A}_x$ the germ of the section $f(x)$, and use the fact that continuous maps to a discrete space are locally constant.
A: I'm late to the party, but here is the answer for reference's sake to the question of how to define the morphism $\psi$ in the verification of the universal property, as asked in the original question.  
Let $f \in \mathcal{A}(U)$ for $U \subseteq X$ open.  The key observation is that $\{f^{-1}(a)\}_{a \in A}$ forms a pairwise disjoint open cover of $U$.  So it is enough to specify the value of $\psi(U)(f)|_{f^{-1}(a)}$ for each $a \in A$.  The condition $\psi \circ \theta = \varphi$ forces us to define $\psi(U)(f)|_{f^{-1}(a)} = \varphi(U)(a)$.  Define $\psi(U)(f)$ to be the section in $\mathcal{F}(U)$ obtained by gluing these together.  
A: Here is an answer that goes into gory detail, which may be helpful for some people (it certainly was for me). If you do read my solutions, I suggest you go and rewrite them yourself actively.
So to recap, we have the presheaf $\mathcal{F}$ of constant functions and the sheaf $\mathcal{A}$ of locally constant functions for some abelian group $A$, i.e. $$\mathcal{A}(U)=\{f:U\to A \mid \forall x\in U \exists x\in V\subseteq U. f:V\to A \text{ constant}\}.$$ We want to show that $\mathcal{F}^+\cong \mathcal{A}$.
From the definition of $\mathcal{F}^+$ there exists a natural morphism $\theta:\mathcal{F}\to \mathcal{F}^+$ which induces an isomorphism of stalks $\theta_x:\mathcal{F}_x\to \mathcal{F}_x^+$. We also have a natural morphism $\varphi:\mathcal{F}\to \mathcal{A}$ that sends the element $a\in A$ to the constant function that maps to $a$. More explicitly, we have $\mathcal{F}(U)=A$ and so \begin{align*}\varphi_U:A &\to \mathcal{A}(U) \\
a &\mapsto (u\mapsto a) \end{align*} (If we are really pedantic we should explicitly state that this is well-defined, but it's easy to see that it is.)
From the universal property of sheafification we know get a unique morphism $\psi:\mathcal{F}^+\to \mathcal{A}$ such that $\psi\circ \theta=\varphi$. We now show that $\theta$ is an isomorphism and to do that, it suffices to show that $\psi_x:\mathcal{F}_x^+ \to \mathcal{A}_x$ is an isomorphism for all $x$.
Injective: The stalk $\mathcal{F}_x^+ \cong \mathcal{F}_x\cong A$ and so the map on stalks is $\psi_x:A \to \mathcal{A}_x$ given by $\psi_x(a)=(u\mapsto a)_x$. If $\psi_x(a)=\psi_x(b)$ then $(u\mapsto a)_x = (u\mapsto b)_x$ so that $(u\mapsto a)=(u\mapsto b)$ when restricted to some $x\in W\subseteq U$. Applying to $x$ gives $a=b$.
Surjective: As suggested by user314's answer, consider $f_x\in \mathcal{A}_x$. Because $\psi_x\circ \theta_x=\varphi_x$ it suffices to show that $\varphi_x$ is surjective now. As $f:U\to A$ is locally constant, there exists $x\in W\subseteq U$ such that $f:W\to A$ is constant. Now let $a=f(x)$. Then $\varphi_x(a)=f_x$.
