#! /usr/bin/perl -wi

while (<>)
{
  if (/^Index: (.*)/)
    {
      $full = $1;
      ($small) = ($full =~ m=.*/([^\t]*)=);
      print;
      $small || next;
      for (1..4) { $_ = <>; print; }
      for (1..2)
        {
          $_ = <>;
          s/$small/$full/;
          print;
        }
    }
  else
    {
      print;
    }
}
