Python3 two-step solution. (Rotation + applying gravity)
\nclass Solution:\n    def rotateTheBox(self, box: List[List[str]]) -> List[List[str]]:\n        m, n = len(box), len(box[0])\n        # Rot_box has [n, m] shap
```\nclass Solution:\n    def rotateTheBox(self, box: List[List[str]]) -> List[List[str]]:\n        m, n = len(box), len(box[0])\n        # Rot_box has [n, m] shape.\n        rot_box = [[\'.\' for _ in range(m)] for _ in range(n)]\n        for i in range(m):\n            for j in range(n):\n                rot_box[j][m-i-1] = box[i][j]\n        \n        # Apply gravity\n        for i in range(n-1, -1, -1):\n            for j in range(m):\n                if rot_box[i][j] == \'*\' or rot_box[i][j] == \'#\':\n                    continue\n                # Empty. find the upper stone and pool the stone to here\n                for k in range(i-1, -1, -1):\n                    if rot_box[k][j] == \'*\':\n                        break\n                    elif rot_box[k][j] == \'#\':\n                        rot_box[k][j] = \'.\'\n                        rot_box[i][j] = \'#\'\n                        break\n        \n        return rot_box\n```
[]