Simple Python Solution using matrix and performing operations as given in question: Brute force
\n\nclass Solution:\n    def decodeCiphertext(self, encodedText: str, rows: int) -> str:\n        #print(len(encodedText),rows,len(encodedText)//rows)\n        
![image](https://assets.leetcode.com/users/images/f4dad618-812b-4567-acfb-b02c4394eb06_1637437871.282986.png)\n```\nclass Solution:\n    def decodeCiphertext(self, encodedText: str, rows: int) -> str:\n        #print(len(encodedText),rows,len(encodedText)//rows)\n        if len(encodedText)==0:\n            return ""\n        ans =\'\'\n        x =[]\n        c = len(encodedText)//rows\n        for i in range(0,len(encodedText),c):\n            x.append(list(encodedText[i:i+c]))\n        #print(x)\n        for i in range(c):\n            k = i\n            p=\'\'\n            for j in range(rows):\n                try:\n                    p = p+x[j][k]\n                except:\n                    pass\n                k = k+1\n            ans = ans+p\n        return ans.rstrip()\n```\n#  Upvote if useful
['Matrix', 'Python', 'Python3']