C++ Simple solution
\nvector<vector<char>> rotateTheBox(vector<vector<char>>& box) {\n        int n = box.size();\n        int m = box[0].size();\n        vector<vector<char>>res;\
```\nvector<vector<char>> rotateTheBox(vector<vector<char>>& box) {\n        int n = box.size();\n        int m = box[0].size();\n        vector<vector<char>>res;\n        for(int i=0;i<n;i++){\n            for(int j=m-2;j>=0;j--){\n                int k = j;\n                while(k+1 < m && box[i][k] == \'#\' && box[i][k+1] == \'.\'){\n                    swap(box[i][k],box[i][k+1]);\n                    k++;\n                }\n            }\n        }\n       for(int j=0;j<m;j++){\n            vector<char>temp;\n            for(int i=n-1;i>=0;i--){\n                temp.push_back(box[i][j]);\n            }\n            res.push_back(temp);\n        }\n        return res;\n    }\n```
[]