#include <bits/stdc++.h>
using namespace std;

int main() {
    string s; getline(cin,s);
    
    for (char c : s)
        if(!isalpha(c) && c != '') {
            cout << "Invalid input";
            return 0;
        }
stringstream ss(s);
vector<string> w; string x;
while (ss >> x) w.push_back(x);

int m=0;
for (auto &a : w) m = max(m, (int)a.size());

cout << "[";
for (int i = 0; i < m; i++) {
    string row = "";
    for (auto &a : w)
    row += (i < a.size() ? a[i] :
while (!row.empty() && row.back() == ' ')
    row.pop_back();
cout << "\"" << row << "\"';
if (i != m - 1) cout << ",";
}
cout << "]";   
}