The imaginary time step method for Thomas-Fermi equations