Characterizing Closed Curves on Riemann Surfaces via Homology Groups of Coverings