Simple and very easy
```\nclass Solution {\npublic:\n    string decodeCiphertext(string encodedText, int rows) {\n        int n = encodedText.size();\n        int col = n/rows;  //b
```\nclass Solution {\npublic:\n    string decodeCiphertext(string encodedText, int rows) {\n        int n = encodedText.size();\n        int col = n/rows;  //bcs n = rows*cols(always) -> observation\n        string res;\n        for(int i=0;i<col;i++){\n            for(int j=i; j<n; j+=(col+1)) //we can observe that to travel diagonallly we have to increamnt by (col+1)\n                res += (encodedText[j]);\n        }\n        while(res.back() == \' \') res.pop_back();\n        \n        return res;\n    }\n};
[]