#include<iostream>
#include<cstdio>
using namespace std;
int main() {
char str[81];
while (scanf("%s", &str) != EOF) {
char matrix[80][80];
for (int i = 0; i < 80; ++i) {
for (int j = 0; j < 80; ++j) {
matrix[i][j] = ' ';
}
}
int count = 0;
while (str[count] != '\0') {
++count;
}
int x, y;
x = (count + 2) / 3;
y = x + (count + 2) % 3;
for (int i = 0; i <= y - 1; ++i) {
matrix[x - 1][i] = str[x - 1 + i];
}
for (int j = 0; j <= x - 1; ++j) {
matrix[j][0] = str[j];
matrix[j][y - 1] = str[count - 1 - j];
}
for (int i = 0; i <= x - 1; ++i) {
for (int j = 0; j <= y - 1; ++j) {
cout << matrix[i][j];
}
cout << endl;
}
}
return 0;
}
#include<cstdio>
using namespace std;
int main() {
char str[81];
while (scanf("%s", &str) != EOF) {
char matrix[80][80];
for (int i = 0; i < 80; ++i) {
for (int j = 0; j < 80; ++j) {
matrix[i][j] = ' ';
}
}
int count = 0;
while (str[count] != '\0') {
++count;
}
int x, y;
x = (count + 2) / 3;
y = x + (count + 2) % 3;
for (int i = 0; i <= y - 1; ++i) {
matrix[x - 1][i] = str[x - 1 + i];
}
for (int j = 0; j <= x - 1; ++j) {
matrix[j][0] = str[j];
matrix[j][y - 1] = str[count - 1 - j];
}
for (int i = 0; i <= x - 1; ++i) {
for (int j = 0; j <= y - 1; ++j) {
cout << matrix[i][j];
}
cout << endl;
}
}
return 0;
}