Build Trajectory File from xyz data from cp2k

I have an MD trajectory generated with cp2k in the format:

50

i = 0, time = 0.000, E = -541.8375301329

Si 0.4197585062 5.4256919871 8.2294223439

Si 0.3879621374 2.4516966503 7.7725441842

O -0.0451516710 5.9333067897 0.1272225704

O 0.7776087268 4.0069162221 7.5126676891
...


The first line indicates the number of atoms, second line i=  time=

Anthony