combining two lines in Linux script

Here is my original file

A07ISALES
12
12
383.G_M_GMX272.HAMTRAMCK.INTERIOR_TRIM.32949

I want to convert it to

A.07.ISALES.12.383.G_M_GMX272.HAMTRAMCK.INTERIOR_TRIM.32949

Basically, from first record, I separate the characters, add period and concatenate to rest of the records in file. Remove the record. From second record, concatenate the value and add the period. Remove second and third record. This should be added to all the records too.

How can I do this using sed command inside the script from input file?

One way with awk:

awk '{s=NR==1?"":"."}{printf("%s%s",s,$0)}END{print ""}' file

Regards

GOOD WRITTING, NICE WORK...!

Another (simpler) way of using awk:

awk 'BEGIN{FS="\n";RS="";OFS="."} {print $1,$2,$3,$4}' file

this is using sed...