Consider a long cylindrical wire with a radius $R$ and thermal conductivity $k$. A current runs through it such that each unit volume of the wire produces $p$ amount of heat per unit time. If the temperature of the cylindrical surface of the wire is maintained at $T_0$, determine the temperature distribution in the wire $T(r)$ as a function of its radial coordinate $r$.