BEGIN{i=1;j=1;print "<Story id=\"\">";print "<Sentence id=\"\">";print "0\t((\tSSF"}
{
if($0)
if($1!=".")
{
print j,"\t" ,$1 ,"\t",$NF;
j++;
}
     else{
        print j,"\t" ,$1 ,"\t",$NF;
        j=1;
        print "\t))";
        print "</Sentence>\n";
        print "<Sentence id=\"\">";
        i++;
        print "0","\t","((\tSSF";
     }

}
END{print "\t))";print "</Sentence>";print "</Story>";}

