#include<iostream>
#include<string>
using namespace std;
int main()
{
string str;
cin >> str;
int len = str.length();
int n1 = (len + 2) / 3 - 1;
int n2 = len - 2 * n1;
int i;
for (i = 0; i < n1; i++) {
cout << str[i];
for (int j = 0; j < n2 - 2; j++)
cout << " ";
cout << str[len-i-1]<<endl;
}
int len1 = n2 + i;
for (i; i <len1; i++) {
cout << str[i];
}
system("pause");
return 0;
}