Java Solution
\nclass Solution {\n    public String decodeCiphertext(String encodedText, int rows) {\n        StringBuilder result = new StringBuilder();\n        int columns
```\nclass Solution {\n    public String decodeCiphertext(String encodedText, int rows) {\n        StringBuilder result = new StringBuilder();\n        int columns = encodedText.length() / rows;\n\n       for(int col = 0; col < columns; col++) {\n           int i = 0; int j = col;\n\n           // Iterate through the given diagonal\n           while(i < rows && j < columns) {\n                result.append(encodedText.charAt((columns * i) + j));\n                i++; j++;\n           }\n       }\n\n       return result.toString().stripTrailing();\n    }\n}\n```
['Java']