#This program converts a file in .asn format to one in .mat
#format to be solved as a matching problem 

BEGIN {firstarc = 1; 
       print "c  Transformed from asn problem" }  

#make first line or flag error 
(NR == 1) && ($2 == "asn") { nodes = $3; arcs = $4;
			     print "p  edge" , nodes, arcs 
			   }
(NR == 1) && ($2 != "asn") { print "ERROR WRONG INPUT FORMAT"}

#copy over comments 
$1 == "c" {print $0}

#ignore sources 

#make arcs
$1 == "a"	{print "v", "\t", $2, "\t", $3, "\t",  $4}



