#!usr/bin/perl

open (INFILE, $ARGV[0]);

while ($line = <INFILE>){
	$line =~ s/\s+$//;
	$line =~ s/\"//;	
	$line =~ s/\"//;
	@split = split ",", $line;

#		$split[3] =~ s/\[A\/T\]/W/;
#                $split[3] =~ s/\[T\/A\]/W/;

#                $split[3] =~ s/\[A\/G\]/R/;
#                $split[3] =~ s/\[G\/A\]/R/;

#                $split[3] =~ s/\[C\/T\]/Y/;
#                $split[3] =~ s/\[T\/C\]/Y/;

#                $split[3] =~ s/\[C\/G\]/S/;
#                $split[3] =~ s/\[G\/C\]/S/;

#                $split[3] =~ s/\[G\/T\]/K/;
#                $split[3] =~ s/\[T\/G\]/K/;

#                $split[3] =~ s/\[A\/C\]/M/;
#                $split[3] =~ s/\[C\/A\]/M/;

		if ($split[3] =~ /A|T|C|G/){
			print ">", $split[0], "_", $split[1], "_", $split[2], "_", $split[4], "/", $split[5], "/", $split[6], "\n";
			print $split[3], "\n";
}		}
