I have about 1000 files that contain xyz Cartesian coordinates of chemical structures, a sample is provided below
Re -0.87242200 -0.87371100 0.24194200
Re -1.38612300 1.83520600 0.44292100
Re 1.78955700 -0.15746900 0.71425500
What I'd like to do, preferably through a 'for' loop, is to add an extra line after the second encounter of Re, in that line add a symbol 'H' at the first position of the line then introduce xyz coordinates in the form 1.5+X 1.5+Y 1.5+Z, where X Y and Z are the coordinates of the the second Re. These xyz coordinates should be in position 20, 40 and 60 in the new line (for X, Y and Z respectively).