Updated Task33 with diagonals checking