END{h="\n---+---+---\n" for($0="1|9|4"h"7|2|9"h"5|6|3\n";sub(++i,i%2?" X ":" O ");)print gensub(/[0-9]/," ","g")}