rewrite test3.pl