#!/usr/bin/perl -w

open FH, $ARGV[0]; 

my $tag_st = "readnames";
my $tag_ed = "phase";
my $tag_ed2 = "Relation";
$st_flag=0;
$ed_flag=0;
# printf "%s %s %s\n",$ARGV[0],$ARGV[1],$tag_st;

while ($line = <FH>) 
{
   chomp ($line);
   if($line ne "")
   {
       $fields[0]="";
       @fields = split(/\s/,$line);
       if($fields[0] eq $tag_st)
       {
         $st_flag=1;
       }
       if(($fields[0] eq $tag_ed)||($fields[0] eq $tag_ed2))
       {
         $ed_flag=1;
         $st_flag=0;
       }

   }
   if($st_flag)
   {
     printf "%s\n",$line;
   }
} 
__END__
