Find all $x\in \mathbb{Z}$ with $x \equiv 2 \mod 4$ , $x \equiv 8\mod9$ and $x \equiv 1\mod5$
My attempt:
$\gcd\left(9,5,4\right) = 1 = 9r+5s+4\times0$
$9 = 1\times5+4$
$5 = 1\times4+1$
so $1 = 5-(9-5) = 2\times5 - 1\times9$
thus $r=-1$ and $s = 2$
so $x = 2\times5\times8 -1\times9\times1=80 - 9=71\mod 180$
But the problem is that $71\equiv8\mod9$ and $71\equiv1\mod5$, but $71 \ne 2 \mod 4$. What is wrong?