#!/usr/bin/perl

while(<STDIN>) {
   chomp;
   split / /;
   for (@_) {
      $GZSUFF = "";
      if (/.gz$/)
       { s/.gz$//; $GZSUFF = " gz" if ($ARGV[1] == "-gz"); }
      s/\./helm:rdf:www.cs.unibo.it\/helm\/rdf\/$ARGV[0]\/\/cic:/;
      s/\.xml//;
      print $_.$GZSUFF."\n";
 }
}
