add printMat for N <=18