  We present the first study of production of $\psi (4040)$, $\psi (4160)$, and
$\psi (4415)$ mesons in hadronic matter. Quark interchange between two
colliding charmed mesons leads to the production of the three mesons. We
calculate unpolarized cross sections for the reactions, $D\bar{D} \to \rho R$,
$D\bar{D}^* \to \pi R$, $D\bar{D}^* \to \rho R$, $D^*\bar{D} \to \pi R$,
$D^*\bar{D} \to \rho R$, $D^*\bar{D}^* \to \pi R$, and $D^*\bar{D}^* \to \rho
R$, where $R$ stands for $\psi (4040)$, $\psi (4160)$, and $\psi (4415)$. In
the temperature region covering hadronic matter the peak cross sections of
producing $\psi (4040)$ are similar to or larger than the ones of producing
$\psi (4415)$, and the latter are generally larger than those of producing
$\psi (4160)$. With the cross sections we establish new master rate equations
for $\psi (4040)$, $\psi (4160)$, and $\psi (4415)$. The equations are solved
for central Pb-Pb collisions at $\sqrt{s_{NN}}=5.02$ TeV at the Large Hadron
Collider. Solutions of the equations show that the $\psi (4040)$ number density
at kinetic freeze-out of hadronic matter is larger than the $\psi (4415)$
number density which is larger than the $\psi (4160)$ number density.
