} else { print NDAT $INPUT{"q$i-a$j"}; print NDAT "\n";