Consider the cell complex $X$ which is the circle with two discs attached along the attaching maps of degree $3$ and $5$. I would like to compute cohomology with integral coefficients using cellular cohomology and the universal coefficient theorem.
First, the cellular chain complex is as follows (from degree $2$ to degree $0$):
$$ 0 \to\mathbb Z\oplus\mathbb Z \to \mathbb Z \to \mathbb Z \to 0$$ where the first (non trivial, degree $2$) boundary map sends $(a,b) \to (3a+5b)$ while the degree $1$ map is simply $0$.
Computing the homology, we get $H_0(X) \cong H_2(X) \cong \mathbb Z$ and $H_1(X) \cong \mathbb Z/3\times\mathbb Z/5$.
Dualizing the complex to compute cohomology, we have (from degree $0$ to degree $2$): $$0 \to \mathbb Z \to \mathbb Z \to \mathbb Z\oplus \mathbb Z \to 0$$ where the final non trivial map is now $1 \to (3,5)$ and the other maps are trivial. Computing the cohomology, we now have: $$H^2(X) \cong H^0(X) \cong \mathbb Z$$ since $(3,5),(1,2)$ forms a basis for $\mathbb Z\oplus\mathbb Z$ while $H^1(X)$ is $0$.
Now, let me compute the cohomology rings using UCT:
We have the exact sequence: $$0 \to Ext^1(H_0(X),\mathbb Z)\to H^1(X) \to Hom(H_1(X),\mathbb Z)$$ and since both the $Ext$ and $Hom$ terms vanish, $H^1(X) \cong 0$ as expected.
On the other hand, we also have: $$0 \to Ext^1(H_1(X),\mathbb Z) \to H^2(X) \to Hom(H_2(X),\mathbb Z)\to 0.$$
Here however, the $Hom$ term is $\mathbb Z$ while the $Ext$ term is $\mathbb Z/3\mathbb Z \oplus \mathbb Z/5\mathbb Z$ so that $H^2 \cong \mathbb Z\oplus \mathbb Z/3\oplus\mathbb Z/5$ which does not match my earlier commputation.
Where did I go wrong?