Updated print2darray function for minimal output