Let $V$ be a vector space over $K$ and $T(V)$ denote the tensor algebra on $V$. It is well known that $T(V)$ is the free algebra on $V$. I've been told that it is also the cofree coalgebra on $V$ with comultiplication $\Delta:T(V)\rightarrow T(V) \otimes T(V)$ given by $\Delta(v_1\dots v_n)=\sum_{\sigma\in S_n}\sum_i v_{\sigma(1)}\dots v_{\sigma(i)}\otimes v_{\sigma(i+1)}\dots v_{\sigma(n)}$ where juxtaposition is shorthand for "internal" tensors and $S_n$ is the symmetric group.
To prove $T(V)$ is the free algebra, one takes a $K$-algebra $A$ and linear map $f:V\rightarrow A$ and shows that there is a unique algebra map $g:T(V)\rightarrow A$ such that $g\iota=f$ where $\iota:V\rightarrow T(V)$ is the inclusion map. The map $g$ is defined by $g(v_1\dots v_n) = f(v_1)\dots f(v_n)$.
I would like to show that for each $K$-coalgebra $C$ and each linear map $f:C\rightarrow V$ there is a unique coalgebra map $g:C\rightarrow T(V)$ such that $pg=f$ where $p:T(V)\rightarrow V$ is the projection map. However, in the cofree case, I don't see how to define $g$ because there doesn't seem to be an analogous procedure to "distributing over tensors" for a coalgebra map. I can't understand why a coalgebra map $g$ satisfying $pg=f$ is uniquely determined by $f$.
Edit: now I'm not even sure that this comultiplication is coassociative. Is something wrong here?