easy solution using sorting || beats 78.95% RT , Memory 61.60
\n\n# Code\n\nclass Solution:\n    def rotateTheBox(self, box: List[List[str]]) -> List[List[str]]:\n        lst=[]\n        for i in box:\n            v=[]\n  
![image.png](https://assets.leetcode.com/users/images/663c14cf-095c-40fa-853a-b22801525553_1677304066.5676026.png)\n\n# Code\n```\nclass Solution:\n    def rotateTheBox(self, box: List[List[str]]) -> List[List[str]]:\n        lst=[]\n        for i in box:\n            v=[]\n            val=""\n            st=""\n            for j in i:\n                if j!="*":\n                    st+=j\n                else:\n                    st=sorted(st)\n                    val+="".join(st[::-1])\n                    val+="*"\n                    st=""\n            if st:\n                st=sorted(st)\n                val+="".join(st[::-1])\n            for k in val:\n                v.append(k)\n            lst.append(v)\n        lst=lst[::-1]\n        ans=[]\n        for i in zip(*lst):\n            ans.append(i)\n        return ans\n        \n\n        \n```
['Sorting', 'Python3']