prints nxm matrix diagonally