#include <iostream>
#include <string>

using namespace std;

int main() {
    string rbg[5];
    for (int i = 0;i < 5;i++) {
        cin >> rbg[i];
    }
    for (int j = 0;j < 15;j++) {
        for (int i = 0;i < 5;i++ ) {
            if (rbg[i].length() > j) {
                cout << rbg[i][j];
            }
        }
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: