100%. good not great.
python3 []\nclass Solution:\n    def areSimilar(self, mat: List[List[int]], k: int) -> bool:\n        n, k = len(mat[0]), k % len(mat[0])\n        if k == 0: re
```python3 []\nclass Solution:\n    def areSimilar(self, mat: List[List[int]], k: int) -> bool:\n        n, k = len(mat[0]), k % len(mat[0])\n        if k == 0: return True\n        for i, r in enumerate(mat):\n            rot = r[k:n] + r[:k] if i & 1 else r[-k:n] + r[:-k]\n            if not r == rot: return False\n        return True\n```
['Python3']