4. The real number $x$ between $0$ and $1$ has decimal representation
$$
0\mathord{\cdot}a_1a_2a_3a_4\ldots
$$
with the following property: the number of distinct blocks of the form
$$
a_ka_{k+1}a_{k+2}\ldots a_{k+2003},
$$
as $k$ ranges through all positive integers, is less than or equal to $2004$.
Prove that $x$ is rational.