Check for duplicates in rows and columns for Hitori