print maze function